Palindrome help please [solved]

instructions say, “Note You’ll need to remove all non-alphanumeric characters (punctuation, spaces and symbols) and turn everything lower case in order to check for palindromes.”

however, one of the test cases says, “palindrome(“0_0 (: /-\ :slight_smile: 0-0”) should return true.”

so, is it expecting a returned value of “” and thus an empty string is a palindrome?
or is it contradicting itself, expecting punctuation/symbols?

Hi @JuggernOtt81

You’re only removing non-alphanumeric, that string contains 0’s, so after removing all the invalid characters you’re left with 0000, which would be a palindrome =)

looks like .replace(/[\W_]/g, ""); works, then.

Re-read the challenge description:

Return true if the given string is a palindrome. Otherwise, return false.