Created
March 29, 2019 16:57
-
-
Save KevinPy/d8e108cd76d733423bcdfb35e634efb9 to your computer and use it in GitHub Desktop.
Filter unique values
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 array = [1, 1, 2, 3, 5, 5, 1] | |
const uniqueArray = [...new Set(array)]; | |
console.log(uniqueArray); // [1, 2, 3, 5] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment