Tell us what’s happening:
Whats wrong with my code? I literally have no idea? Can somebody help?
Your code so far
function mutation(arr) {
var first = arr[0].toLowerCase();
var second = arr[1].toLowerCase();
for(var i = 0; i<second.length; i++){
if(first.indexOf(second[i]) === -1){
return false;
}else{
return true;
}
}
}
mutation(["hello", "hey"]);
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36
.
Link to the challenge:
https://www.freecodecamp.org/challenges/mutations