Palindrome("1 eye for of 1 eye.") should return false

My Code is All tests are passed but except this test “palindrome(“1 eye for of 1 eye.”) should return false.”
Help me …My Code is following


function palindrome(str) {
  // Good luck!
  var res = str.replace(/[\d'`~!@#$%^&*()_|+-=?;:' ",.<>\{\}\[\]\\\/]/gi,"").toLowerCase();
  
 // return res.split('').reverse().join('');
 
  if(res === res.split('').reverse().join(''))
    return true;
  else
    return false;
  
}

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

It isn’t asking you to ignore numbers:

“1eyeforof1eye” is not the same as “eye1forofeye1”

I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

markdown_Forums