Tell us what’s happening:
The code passes all the tests except for the first one which tests if all the characters from “hey” is inside “hello”. I tried to test it by doing
console.log("hello".includes("h", "e", "y"));
and this is evaluating to True… If I change the ordering around for “hey”, it returns false sometimes, but not always… Is this a bug?
**Your code so far**
function mutation(arr) {
var lowerCase = arr.map(string => string.toLowerCase());
return lowerCase[0].includes(...lowerCase[1]);
}
console.log("hello".includes("h","e","y")); // Evaluates to True for some reason
console.log(mutation(["hello", "hey"]));
**Your browser information:**
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36
.
Challenge: Mutations
Link to the challenge: