Tell us what’s happening:
hello everyone i dont know whats wrong with my script
or is my approach wrong ?
Your code so far
for (let i = 0 ; i < arr[1].length; i++){
for (let p = 0 ; p < arr[0].length; p++){
if (arr[1][i] == arr[0][p]) { if (i == arr[1].length - 1){
return true;
}
} else {return false }
}
}
}
mutation(["hello", "he"]);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-algorithm-scripting/mutations