justask.dev

Community powered answers to your dev questions

Unique values from array

posted: 2019 December 6th

category: javascript

Edit this post on GitHub.

Back

Set is your friend here

1var duplicateArrya = [...new Set([1, 2, 3, 3])]
2>> [1, 2, 3]

Author: Rich Haines