Created
May 15, 2018 17:25
-
-
Save niccai/4d2f42a37c4d82996c08d6ef06bffcc7 to your computer and use it in GitHub Desktop.
Dedupe items in an array
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 originalArray = [3,3,26,3,3,26,26]; | |
const dedupedArray = [...new Set(originalArray)]; | |
console.log(dedupedArray); | |
// [3, 26] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment