Created
March 10, 2017 22:08
-
-
Save vitkon/7b2292dde5338541f2dca7f3008d2823 to your computer and use it in GitHub Desktop.
Array with unique elements (dedupication)
This file contains 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
const unique = arr => arr.filter( | |
(el, index, self) => index === self.indexOf(el) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment