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;
}
}
palindrome("eye");
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:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/palindrome-checker/