Tell us what’s happening:
So far I can reach. but [“hello”, “heo”], should return true because all of the letters in “heo” are present in “Alien”. How can i solve this part. i don’t wanna get code actually, i want to get some descriptive clue. Thanks in advance.
Your code so far
function mutation(arr) {
if (arr.indexOf(arr[1]) > -1) {
return true;
} else if (arr.indexOf(arr[1]) === -1){
return false;
}
}
mutation(["hello", "heo"]);
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36
.
Link to the challenge:
https://www.freecodecamp.org/challenges/mutations