I want this function to work and produce the array [1,1], why doesn't it work?
function destroyer(arr) {
return arr.reduce(function(a,b){
if (arguments.slice(1).every(function(arg){
return arg !== b;
})) a.push(b);
return a;
}, []);
}
destroyer([1, 2, 3, 1, 2, 3], 2, 3);
[1,1]?