Palindrome checker is not working proprly

Tell us what’s happening:
I am running this code…but on the output console it just shows running,but not executing the code. please help me out.I am not getting the idea how to run the code

Your code so far

function palindrome(str) {
  str = str.replace(/[\W_]/g, "");
  var reverseStr =str.toLowerCase().split("").reverse().join("");
  if(str === reverseStr) {
      return true;
  } else {
      return false;



Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134.

Link to the challenge:

The ones you are failing are the ones involving capitalization. That’s because you convert reverseStr to lowercase, but you never do for str, so it fails because “M” isn’t the same thing as “m”.

You just need to add .toLowerCase() to the first line and then everything works