Tell us what’s happening:
it says target.toLowercase is not a function cant pass the test
Your code so far
function mutation([target,test],i=0) {
target=target.toLowercase();
test=test.toLowercase();
return i>= test.length
?true
:!target.includes(test[i])
? false
: mutation([target,test],i+1);
}
function mutation([target,test],i=0) {
target=target.toLowercase();
test=test.toLowercase();
return i>= test.length
?true
:!target.includes(test[i])
? false
: mutation([target,test],i+1);
}
mutation(["hello", "hey"]);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36
.
Challenge: Mutations
Link to the challenge: