Mutations with method .includes

Tell us what’s happening:
Hello everyone,

I tried to solve this JS challenge with .includes().

The code below can pass every other test, except mutation([“hello”, “hey”]);

Why??? It bothers me so much:thinking:


Your code so far

function mutation(arr) {
let firstString=arr[0].toLowerCase().split("");
let secondString=arr[1].toLowerCase().split("");
for (let i=0;i<secondString.length;i++){
return true;
return false;
mutation(["hello", "hey"]);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36.

Challenge: Mutations

Link to the challenge:

Hey @ayten1871, try to read your code as an interpreter would - line by line. What does this if statement do?

  return true;


1 Like

Thank you for your kindly reply, it helps a lot:smiley: