Created
March 19, 2017 02:21
-
-
Save lachlan-eagling/3cac0a2b31ab7996ee9de4582a24ac9d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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