Skip to content

Instantly share code, notes, and snippets.

@lachlan-eagling
Created March 19, 2017 02:21
Show Gist options
  • Select an option

  • Save lachlan-eagling/3cac0a2b31ab7996ee9de4582a24ac9d to your computer and use it in GitHub Desktop.

Select an option

Save lachlan-eagling/3cac0a2b31ab7996ee9de4582a24ac9d to your computer and use it in GitHub Desktop.
// Remove elements from an array that match additional parameters passed to function.
function destroyer(arr) {
var args = Array.from(arguments);
return arr.filter(function(x){
return !args.includes(x);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment