Last active
July 1, 2019 09:47
-
-
Save chickenfoot88/016121cd4921aa805cd750f17a8a1a2f to your computer and use it in GitHub Desktop.
removes array from duplicates
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
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