A short-hand way to do it is to convert it to an array via the ES6 spread operator.
Then all the array functions are available to you.
const mySet = new Set([1,2,3,4]);
[...mySet].reduce(...);
A short-hand way to do it is to convert it to an array via the ES6 spread operator.
Then all the array functions are available to you.
const mySet = new Set([1,2,3,4]);
[...mySet].reduce(...);