Uhhhh something worng with test results I guess

Uhhhh something worng with test results I guess
0.0 0

#1

After inserting this code in the palindrome detector challenge:

function palindrome(str) {
  arr = str.toString().toLowerCase().split("")
  invarr = []
  for(i = arr.length - 1; i > 0 - 1; i--) {
    if(arr.toString().charCodeAt(i) != 44 || arr.toString().charCodeAt(i) <= 65 || arr.toString().charCodeAt(i) >= 122) {
      arr = arr.slice(0, i)
  }
    invarr.splice(arr.length - arr.indexOf(i) + 1, 0, arr[i])
  }
  return arr.join("") === invarr.join("") 
}


palindrome("eye");

I’m getting all results as wrong. Tried it on a different console and it worked smoothly


#2

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.


#3

What do the failing tests say?