title: Anagram with JavaScript
body: <pre><code>const myAnagram = (arr1, arr2) =&gt; {
    let str1 = arr1;
    let str2 = arr2;
    let temp1 = [];
    let temp2 = [];
    let flag = 0;
  
    if (str1.length !== str2.length) return &quot;Not Anagram statement A&quot;;
  
    for (var i = 0; i &lt; str1.length - 1; i++) {
      temp1[i] = str1[i];
    }
  
    for (var j = 0; j &lt; str2.length - 1; j++) {
      temp2[i] = str2[i];
    }
  
    temp1.sort();
    temp2.sort();
  
    for (var k = 0; k &lt; str1.length - 1; k++) {
      if (temp1[j] !== temp2[j]) return &quot;Not Anagram statement C&quot;;
      return &quot;Anagram! statement D&quot;;
    }
  }
  </code></pre>