Tell us what’s happening:
so here is comparison with my code and another code basically yor code i write the same way but your cd=ode work but my didnt what is the problem i am facing problems in many solutions like this
Your code so far
function mutation(arr) {
var test = arr[1].toLowerCase();
var jest = arr[0].toLowerCase();
for (var i=0; i<test.length; i++){
if(jest.indexOf(test[i]) === -1){
return false;
}
return true;
}
}
function mutation(arr) {
var test = arr[1].toLowerCase();
var target = arr[0].toLowerCase();
for (var i=0; i<test.length; i++) {
if (target.indexOf(test[i]) === -1)
return false;
}
return true;
}
mutation(["hello", "hey"]);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-algorithm-scripting/mutations