title: Javascript includes and map together
body: <p>I'm trying to make a challenge, but is not just about the challenge it self but is more about the fact the I would like to understand how to do it.</p>
  <p>Given an anagram <code>(string)</code>: <code>abba</code></p>
  <p>and an <code>array</code> of words: <code>['aabb', 'abcd', 'bbaa', 'dada']</code></p>
  <p>To find which one is an anagram and which not.</p>
  <p>So I thought I can simply take the string (abba) and with <code>includes</code> and <code>map</code> throught it and just splice the false ones.</p>
  <pre><code>  const res = word.includes(
      words.map(item =&gt;
        item.split('').map(x =&gt; {
          return x
        })
      )
    );
    console.log('res', res);
  </code></pre>
  <p>But I always get one false cause map just returns the array (i.e.) <code>'abcd'</code> and not (i.e.) <code>'a'</code> and the <code>'b'</code> and so on... so that makes impossible to includes() to actually look into the <code>string</code>.</p>
  <p>How can I solve it??</p>
  <p>Where I'm mistaking???</p>
  <p>Thanks!</p>