Created
August 3, 2019 08:19
-
-
Save halityurttas/72020cd7bafc76edd69334508f691395 to your computer and use it in GitHub Desktop.
Javascript array unique
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.unique = function() { | |
return this.filter(function (value, index, self) { | |
return self.indexOf(value) === index; | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment