Tell us what’s happening:
i’ve spent like 5 hour but still don’t know where i did mistake ,pls help
Your code so far
function mutation(arr) {
arr[0].toLowerCase();
arr[1].toLowerCase();
var count=0;
for (i=0; i< arr[1].length;i++)
{
if (arr[0].indexOf(arr[1][i],0) >= 0 )
{
count +=1 ;
}
}
if (count == arr[1].length)
{
return true;
}
else return false;
}
mutation(["hello", "hey"]);
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
.
Link to the challenge:
https://www.freecodecamp.org/challenges/mutations