Last active
March 31, 2019 13:56
-
-
Save eschaefer/43a85800ed8e18510241d75f88a2a36f to your computer and use it in GitHub Desktop.
Clean way of removing duplicates from 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 duped = [1, 2, 3, 3, 3, 2, 1]; | |
const deduped = [...new Set(duped)]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment