Created
August 3, 2019 08:21
-
-
Save halityurttas/52f6891b39cfb9f48c25bf6597e29ff6 to your computer and use it in GitHub Desktop.
Array difference
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
| Array.prototype.diff = function(a) { | |
| return this.filter(function(i) {return a.indexOf(i) < 0;}); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment