Check for Palindromes need help

Need help with this…don’t understand why special characters are not being removed??

function palindrome(str) {
// Good luck!
var myString = str.toLowerCase().replace(/!@#$%^&*().,_/gi, “”);

var newString = myString.split(’’).reverse().join(’’);
if (myString == newString) {
return true;
return false;



Tour regex is wrong.
Use this one instead : /[^a-zA-Z0-9]/g

you can use to play with regular expressions.

Wow was super helpful! Thanks I finished it!