Mutations(solution spoiler)

Oh okay so you need to make the if statement compare wordOne.indexOf(wordTwo[i]) < 0

less than 0, I was strictly comparing it to -1, didn’t work for hello and hey still slightly confused about indexOf, ill go back and look over MDN again

function mutation(arr) {

var wordOne = arr[0];
wordOne = wordOne.toLowerCase().split(’’);
var wordTwo = arr[1];
wordTwo = wordTwo.toLowerCase().split(’’);

for (var i = 0; i < wordTwo.length; i++){
if (wordOne.indexOf(wordTwo[i]) < 0) {
return false;
}
}
return true;
}

mutation([“Hello”, “Hey”]);