function destroyer(arr) {
var args = Array.prototype.slice.call(arguments); //turns arguments into arrays
function checkArgs() {
for (var i = 0; i < arr.length; i++) {
for (var j = 0; j < args.length; j++) {
if (arr[i] == args[j]) {
delete arr[i];
}
}
}
}
return arr.filter(checkArgs);
}
destroyer([1, 2, 3, 1, 2, 3], 2, 3);// remove 2nd, 3rd, etc. arguments from first argument… and return 1st argument (arr).