Weak set is not iterable, you cannot use for-of, keys(), values(), forEach() to traverse values
So what is its function? Is it just about storing objects?
The performance of set is higher than that of map. Its value is reflected when you need to store non-duplicate data and you don’t care about the order of data!
The performance of set is higher than that of map. Its value is reflected when you need to store non-duplicate data and you don’t care about the order of data!