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++){
    return false;
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/ Safari/537.36

Challenge: Basic Algorithm Scripting - Mutations

Link to the challenge:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.