title: Codewars: Alphabet symmetry
body: <p>Nearly i tried to finish a Codewars task called &quot;Alphabet symmetry&quot;.<br>
  Here is the link: <a href="https://www.codewars.com/kata/59d9ff9f7905dfeed50000b0/train/javascript" rel="nofollow noreferrer">https://www.codewars.com/kata/59d9ff9f7905dfeed50000b0/train/javascript</a> <br>
  I tried finish it on JavaScript language. <br>
  So my code is working and it passes all the tests, except one:</p>
  <pre><code>Test.assertDeepEquals(solve([&quot;IAMDEFANDJKL&quot;,&quot;thedefgh&quot;,&quot;xyzDEFghijabc&quot;]),[6, 3, 7]);
  </code></pre>
  <p>The error: Expected: [6, 5, 7], instead got: [6, 3, 7]<br>
  My code:</p>
  <pre><code>function solve(arr){  
  
  
  let alphabeth = 'abcdefghijklmnopqrstuvwxyz'.split('');
    let upAlph = 'ABCDEFGHIGKLMNOPQRSTUVWXYZ'.split('')
    let result = arr.map(function(elem,index,arr){
      let elArr = elem.split('');
      let sum = 0;
      for(let el of elArr){
        if( (el == alphabeth[elArr.indexOf(el)]) || (el == upAlph[elArr.indexOf(el)])) sum++
      };
      return sum;
    })
    return result;
  };
  </code></pre>
  <p>Please, help me find the problem
  Thank ya;)</p>