Skip to content

Instantly share code, notes, and snippets.

@shelldandy
Created May 15, 2016 04:07
Show Gist options
  • Save shelldandy/ba5b09955f59f66bf74c93311103ce3a to your computer and use it in GitHub Desktop.
Save shelldandy/ba5b09955f59f66bf74c93311103ce3a to your computer and use it in GitHub Desktop.
function destroyer(arr) {
var args = Array.prototype.slice.call(arguments, 1);
var filtered = [];
function filter (number) {
var check = args.indexOf(number) === -1;
return check;
}
filtered = arr.filter(filter);
return filtered;
}
destroyer([1, 2, 3, 1, 2, 3], 2, 3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment