monogram
Home
About
Experience
Open Source
Snips
dedupe an array
ES6, JavaScript
const
arr
=
[
1
,
1
,
2
,
2
,
3
,
3
]\
const
deduped
=
[
...new
Set
(arr)];
// [1,2,3]
Prev
Next