Tell us what’s happening:
This is what I had for this quiz but it passed only false
. Please help. Thank you:grinning:
Your code so far
function mutation(arr) {
var elementOne = arr[0].toLowerCase();
var elementTwo = arr[1].toLowerCase();
for (var i = 0; i < elementTwo.length; i++) {
if (elementOne.indexOf(elementTwo[i] === -1)) {
return false;
}
return true;
}
}
mutation(["hello", "hey"]);
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
.
Link to the challenge:
https://www.freecodecamp.org/challenges/mutations