We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
返回Set结构本身
add 方法:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
ES6 之 Set & Module
目录
Set
-Set是无重复值的有序列表。Set允许对它包含的数据进行快速访问,从而增加了一个追踪离散值的更有效方式。你一般不会像对待数组那样来访问Set中的某个项,相反更常见的是,只在 Set 中检查某个值是否存在。
Set的方法
规范中的Set
add 方法:
WeakSet
WeakSet的方法们
WeakSet不能遍历,是因为成员都是弱引用,随时可能消失,遍历机制无法保证成员的存在,很可能刚刚遍历结束,成员就取不到了。WeakSet 的一个用处,是储存 DOM 节点,而不用担心这些节点从文档移除时,会引发内存泄漏。
Map
Map的方法们
WeakMap
The text was updated successfully, but these errors were encountered: