JavaScript Palindrome Checker - Possible Bug in Code Check

When I run the test for the Palindrome Checker I get

// running tests
When the #text-input element contains the text 1 eye for of 1 eye. and the #check-btn element is clicked, the #result element should contain the text “1 eye for of 1 eye. is not a palindrome”.
// tests completed

Should it say that it is a palindrome (the same both forward and reverse)?

1 eye for of 1 eye.

Already all lower-case.

Remove spaces and non-alpha characters for forward spelling:

eyeforofeye

Reverse spelling:

eyeforofeye

eyeforofeye equals eyeforofeye

The assessment shoul be

“1 eye for of 1 eye. is a palindrome.”

You need to remove anything but keep letters and numbers.

As mentioned here at the note of the project:

Note: You’ll need to remove all non-alphanumeric characters (punctuation, spaces and symbols) and turn everything into the same case (lower or upper case) in order to check for palindromes.

It says non-alphanumeric.

1 Like

Thank you. I finished the project.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.