Hi guys,
Are you able to explain why I cannot pass this?
Best wishes
Edy
Your code so far
function mutation(arr) {
var wordOne = arr[0].toLowerCase();
var wordTwo = arr[1].toLowerCase();
for (var i= 0; i < wordTwo.length; i ++){
if (wordOne.indexOf(wordTwo[i]) === -1){
return false;
} else {return true;}
}
}
mutation(["hello", "hey"]);
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36
.
Link to the challenge:
https://www.freecodecamp.org/challenges/mutations