Can anyone help me out? I pass all the True test cases, but none of the false cases.
function mutation(arr) {
let word1 = arr[0].toLowerCase();
let word2 = arr[1].toLowerCase().split("");
word2.forEach(function(i){
if(word1.indexOf(i) < 0)
{
return false;
}
})
return true;
}
mutation(["hello", "hey"]);