use of es6 set code example
Example 1: add to set js
const mySet = new Set();
mySet.add(15);
mySet.add(33);
mySet.add(15);
for(let item of mySet) {
console.log(item)
// expected output: 15
// expected output: 33
}
Example 2: Sets can be used to store __________. in js
let my= new Set()
my.add(1)
my.add("qw")