var count = 0;
function mutation(arr) {
var arrLength = arr.length;
for(var i=0;i < arr[1].length;i++){
if (arr[0].toLowerCase().indexOf(arr[1][i].toLowerCase()) !== -1){
count +=1;
}
}
if (count == arr[1].length){
return true;}
else{
return false;
}
}
mutation(["zyxwvutsrqponmlkjihgfedcba", "qrstu"]);
I get the correct result (true or false) for all the tests(see example above), but they will remain a red X
I see nothing wrong in my code , it checks out for everything, why then, canât I pass the challenge?