Tell us what’s happening:
How can I check/pass into the return statement inside the filter for the content of the array for different values, instead of passing individual values.
Your code so far
function destroyer(arr) {
//let a = (arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments)); // converting arguments to a real array
// 1. ES2015 method of converting arguments to a real array
var a = Array.from(arguments); //
var b = a .slice(1);
var c = arr.filter(function(es) {
return es !== 2 && es !== 3;
});
return c;
}
destroyer([1, 2, 3, 1, 2, 3], 2, 3);
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.79 Safari/537.36
.
Link to the challenge: