EcmaScript Set

# basic usage

“`
let set = new Set();
let set = new Set([a, b, c]);

set.size // the size of set
set.add(a)
set.delete(a)
set.clear()
set.has(value)
set.keys() // the same as keys
set.values() // return the values as a iterator
“`

reference:

[MDN set](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Set)

About 逸飞

后端工程师

发表评论

电子邮件地址不会被公开。 必填项已用*标注