Tell us what’s happening:
I can’t figure out why this problem needs to check for false then return true instead of the inverse if it returns a value greater than or equal to 0. I initially did it this way, where it checked
for (let i = 0; i < test.length; i++) {
if (target.indexOf(test[i]) >= 0) {
return true;
}
}
return false;
}
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Challenge Information:
Basic Algorithm Scripting - Mutations