Tell us what’s happening:
Your code so far
function mutation(arr) {
arr[0] = arr[0].toLowerCase();
arr[1] = arr[1].toLowerCase();
var arr2 = arr[0].split("");
var arr3 = arr[1].split("");
var count = 0;
for (var i = 0; i < arr2.length; i++) {
for (var j = 0; j < arr3.length; j++) {
if (arr2[i] == arr3[j]) {
count++;
}
}
}
if (count >= arr3.length) {
return true;
} else {
return false;
}
}
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/61.0.3163.100 Safari/537.36
.
Link to the challenge:
Why does the final test not pass?