Created
May 15, 2016 04:07
-
-
Save shelldandy/ba5b09955f59f66bf74c93311103ce3a 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
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