Error on Mutations

Error on Mutations
0

#1

please help me with this error: TypeError : Cannot read property 'length' of undefined

...

function mutation(arr,char) {
for(var i=0; i< char.length; i++)
{
if(arr.indexOf(char[i] = -1))
{
return false;
}
}
return true;
}
mutation([“hello”, “hey”])


#2

You are passing 1 parameter.

function mutation(arr,char) {
function expects 2.
That is the problem.


#3

yes! i got it thank you