Set seems like a nice way to create Arrays with guaranteed unique elements, but it does not expose any good way to get properties, except for generator [Set
The code below creates a set from an array and then, using the ... operator.
...
var arr=[1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,]; var set=new Set(arr); let setarr=[...set]; console.log(setarr);