Tell us what’s happening:
It runs but nothing happens. I think the issue is with the filter function. Can someone give me a hint?
Your code so far
var index = 0;
while (index < removeme.length){
if (value == removeme[index]){
return false;
}
else
{
return true;
}
index++;
}
}
function destroyer(arr) {
// Remove all the values
//covert arguments to array
var array = arr.slice.call(arguments);
var realarray = array[0];
var removeme = array.slice(1);
realarray.filter(value,removeme);
return realarray;
}
destroyer([1, 2, 3, 1, 2, 3], 2, 3);
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36
.
Link to the challenge: