Tell us what’s happening:
I am failing only this one test below.
Can someone give me a hint or something?
thx
Your code so far
function mutation(arr) {
let arr1 = arr[0];
let arr2 = arr[1];
for(let i = 0; i < arr2.length; i++){
let str1 = arr1.toLowerCase();
let str2 = arr2.toLowerCase();
if(str1.indexOf(str2[i]) === -1){
return false
}
return true
}
}
mutation(["hello", "hey"]);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
.
Challenge: Mutations
Link to the challenge: