Check for Palindrome eyeforofeye?

Check for Palindrome eyeforofeye?
0

#1

Tell us what’s happening:

**Why does “1 eye for of 1 eye” return false? **

Your code so far

function palindrome(str) {
  // Good luck!
  var newS = str.toLowerCase();
  var arr = [];
  var rarr = [];
  for (i=0;i<newS.length;i++) {
    if(newS.charCodeAt(i) > 96 && newS.charCodeAt(i) < 123){
      arr.push(newS[i]);
      rarr.push(newS[i]);
    }
  }
  rarr.reverse();
  var sarr = arr.join("");
  var srarr = rarr.join("");
  
  if(sarr == srarr) {
    return true;
  }else {
    return false; }
  
}



palindrome("1 eye for of 1 eye.");

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0.

Link to the challenge:


#2

Found the problem, keep the numerals.