A Set is an iterable object which lets you store unique values of any type, whether primitive values or object references. We use the spread syntax (...) to convert the Set object to an array.
1const arr =[1,2,3,5,3,8,13,13,21,5,3,2,21];
4// Output: [1, 2, 3, 5, 8, 13, 21]
Join the newsletter
For monthly notes on software development and entrepreneurship.