Basic Algorithm Scripting - Mutations

Tell us what’s happening:
Describe your issue in detail here.
My code works for all test but - [“hello”, “hey”]. Why is this happening?

  **Your code so far**
function mutation(arr) {
const superset = arr[0].toLowerCase().split("");
const subset = arr[1].toLowerCase().split("");
for(let i=0; i<superset.length; i++){
  if(!superset.includes(...subset)){
    console.log("false");
    return false;
  }
}
console.log("true");
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:

The string hello must have all the letters of hey. As you can see hello does not have a y, so your function must return false.

I think you are are not understanding what if(!superset.includes(...subset)){ is checking (especially the ...subset. You should read more about includes and then modify your algorithm. Currently, it is pure coincidence you are passing many of the other tests.

HINT: You are not checking each letter of the second argument to see if each exists in the first argument. You should be though. It has to do with what you are iterating over.