Tell us what’s happening:
why my method is not correct?
Your code so far
function destroyer(arr) {
// Remove all the values
return arr.filter(function(x) {
for (var j = 1; j < arguments.length; ++j) {
if (arguments[j] == x) return false;
}
return true;
});
}
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_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36
.
Link to the challenge:
https://www.freecodecamp.org/challenges/seek-and-destroy