Created
May 4, 2022 22:39
-
-
Save JimOfLeisure/6f84929c1b2940e3b881a8640dcf5b13 to your computer and use it in GitHub Desktop.
Idea swiped from someone wanting to avoid using Set for getting unique values
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((e, i, a) => i === a.indexOf(e)) }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment