I need help with the Mutations algorithm problem. Can anyone give me a hint or idea on why my evaluation is not equating to true when it’s true etc? Any help is appreciated it.
function mutation(arr) {
let containsLetters = false;
let str1 = arr[0].toLowerCase().split('');
let str2 = arr[1].toLowerCase().split('');
for(let i =0; i < str2.length; i++){
if(str2[i].includes(str1)){
containsLetters = true;
}
}
console.log(containsLetters);
return containsLetters;
}
mutation(["floor", "for"])