A string manipulation exercise that is failimg in the main test.
I tried to figure out if some character was missing or broken, but I can’t figure out.
function hasNoneLetters(phrase, blacklist) {
let x = phrase.toLowerCase();
let y = blacklist.toLowerCase();
let z = '';
for (let i = 0; i <= blacklist.length-1; i++) {
z = blacklist[i];
if (x.lastIndexOf(z)) {
return false;
}
}
return true;
}