Skip to content

Instantly share code, notes, and snippets.

@chickenfoot88
Last active July 1, 2019 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chickenfoot88/016121cd4921aa805cd750f17a8a1a2f to your computer and use it in GitHub Desktop.
Save chickenfoot88/016121cd4921aa805cd750f17a8a1a2f to your computer and use it in GitHub Desktop.
removes array from duplicates
let myArray = [1, 1, 1, 2, 3, 2, 4, 5, 4]
const deDupe = [...new Set(myArray)];
console.log('original', myArray)
console.log('de-dupped', deDupe)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment