1const mySet = new Set();
2
3mySet.add(15);
4mySet.add(33);
5mySet.add(15);
6
7for(let item of mySet) {
8 console.log(item)
9 // expected output: 15
10 // expected output: 33
11}
1const set = new Set();
2
3set.add(1);
4set.add(2);
5set.add(3);
6
7console.log(set.has(2)); //true
8console.log(set.has(4)); //false