Here is the problem. https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/palindrome-checker
My solution was
function palindrome(str) {{
let regex = /\W/g;
/\W/g.remove;
str.toLowerCase;
}
function reverseString(str) {
const reverseString = "";
for (let i = str.length - 1; i >= 0; i++) {
reverseString += str[i];
}
return reverseString;
}
if (str === reverseString) {
return true;
} return false;
}
palindrome("eye");
What should I do?