I need some help, this is what i have, for some reason its returning mutation([“hello”, “hey”]) as true, all of the other cases are returning correctly though
function mutation(arr) {
var b = arr[1].toLowerCase();
var a = arr[0].toLowerCase();
for (i=0; i<b.length; i++) {
if (a.indexOf(b[i]) === -1) {
return false;
} else{
return true;
}
}
}
mutation(["hello", "hey"]);