DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
Removing duplicate values from an array
const
uniqueValue
=
[
...
new
Set
(
[
...
arr
]
)
]
;
console
.
log
(
uniqueValue
)
;
Output
:
[
1
,
3
,
4
,
2
]
Source by javascript.plainenglish.io #
PREVIOUS
NEXT
Tagged:
#Removing
#duplicate
#values
#array
ADD COMMENT
Topic
COMMENT
Name
1+7 =
Submit