Iterating over a set

const set = new Set([2, 2, 3, 3, 4, 4]);

for (const val of set) {
  console.log(val);
}
  
2
3
4