Skip to content

Instantly share code, notes, and snippets.

@niccai
Created May 15, 2018 17:25
Show Gist options
  • Save niccai/4d2f42a37c4d82996c08d6ef06bffcc7 to your computer and use it in GitHub Desktop.
Save niccai/4d2f42a37c4d82996c08d6ef06bffcc7 to your computer and use it in GitHub Desktop.
Dedupe items in an array
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