Basic algorithms mutations 1

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:

there is not a toLowercase method in javascript

it is always useful to consult documentation when in doubt, and remember, javascript is case sensitive:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.