function palindrome(str){
str = str.replace(/[^a-zA-Z0-9]/g, "").split("");
return str.join('') == str.reverse().join('');
}
solved What’s wrong with this code? (for checking palindrones)
function palindrome(str){
str = str.replace(/[^a-zA-Z0-9]/g, "").split("");
return str.join('') == str.reverse().join('');
}
solved What’s wrong with this code? (for checking palindrones)