Tell us what’s happening:
Hi does anybody knows why my code is working in my console but not into the freecode camp one?
Your code so far
function convert(str) {
var string = str.replace(/[^a-zA-Z0-9]/g,'').toLowerCase();
var string1 = string.split("").reverse().join('');
if (string === string1){
return true;
} else {
return false;
}
}
palindrome("never odd or even");
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36.
Link to the challenge: