Last active
April 10, 2021 14:33
-
-
Save salmanx/b1f2a180fa379655ebcdd0366d4e27ee to your computer and use it in GitHub Desktop.
Remove duplicated items from js 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 arr = [1, 1, 12, 4, 4, true, false, true, null]; | |
const filteredArr = [...new Set(arrr)] | |
// result: [1, 12, 4, true, false, null] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment