Tell us what’s happening:
Describe your issue in detail here.
I was able to pass all of the tests except the very first one. I don’t know what makes the first test differ from all of the rest. I made the first array and the second array both lower case.
**Your code so far**
function mutation(arr) {
let firstArr = arr[0].toLowerCase();
let secondArr = arr[1].toLowerCase();
for (let i=0; i< secondArr.length; i++){
if (firstArr.indexOf(secondArr[i]) === -1){
return false;
}else{
return true
}
}
}
mutation(["hello", "hey"]);
**Your browser information:**
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
Challenge: Basic Algorithm Scripting - Mutations
Link to the challenge: