function mutation(arr) {
let arr0 = arr[0].toLowerCase()
let arr1 = arr[1].toLowerCase().split('');
for (let i = 0; i < arr1.length; i++) {
if (arr0.indexOf(arr1[i]) >= 0) {
return true;
}
}
return false;
}
mutation(["hello", "hey"]);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36.
Okay, i have seen the error, i changed the binary operator to <, then i changed the return values. But what if i was not to change the operator, what was i supposed to return. Please i need an explanation