Created
November 27, 2020 09:47
-
-
Save nivrith/2db29fc2fd8d878ec40794f42e5532be to your computer and use it in GitHub Desktop.
Use Set to filter Uni values in array
This file contains hidden or 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, 2, 2, 3,3, 4, 5, 5, 3, 6, 9] | |
| const uniqueArray = [...new Set(array)]; | |
| console.log(uniqueArray); //[1, 4, 6, 9] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment