Mutations... correct code won't clear first test

I’ve got the right code, but the first test won’t show as passed. How do I move forward?

function mutation(arr) {
   var test = arr[1].toLowerCase();
  var target = arr[0].toLowerCase();
 for (var i = 0; i < test.length; i++){
if (target.indexOf(test[i]) < 0){
     return false;
   } else { 
     return true;
mutation(["hello", "hey"]);

It shouldn’t return true because “hello” doesn’t contain “y”. Currently your only checking the length, you also have to make sure the first string contains all the letters of the second.

Your code checks only the first letter and then returns.

I can’t see why that one won’t work.

Thank you. I think I’ll have to come back to it in the morning.

A post was split to a new topic: Mutations can not pass 1st test