https://www.freecodecamp.org/challenges/mutations
Not work “mutation([“hello”, “hey”]) should return false” but everyone else is working.
function mutation(arr) {
var test = arr[0].toLowerCase();
var tar = arr[1].toLowerCase();
for(i = 0;i < tar.length;i++){
if (test.indexOf(tar[i]) < 0){
return false;
}else{
return true;
}
}
}
mutation([“hello”, “hey”]);