Looping through Set collections

Let's have some Set collection:

let set = new Set; set.add(1); set.add(2); set.add(3);

Let's loop through it:

for (let elem of set) { console.log(elem); }

Create a Set collection with some numbers. Loop through this collection and find the sum of its elements.

enru