If I have an array of Sets, what is the best method to combine these Sets into a single Set?
Say if I had this array:
const array = [new Set([1, 2, 3]), new Set([4, 5, 6]), new Set([7, 8, 9])]
How would I manipulate this array in order to produce a single Set with the same output as:
new Set([1,2,3,4,5,6,7,8,9])
This array has an arbitrary number of sets of arbitrary size.