ES6 使用WeakSet ES6 WeakMap ES6 遍历Set ES6 使用WeakSet 'use strict' let weakSet = new WeakSet(); let obj = {msg:"hello"}; weakSet.add(obj); console.log(weakSet.has(obj)); weakSet.delete(obj); console.log(weakSet.has(obj)); ES6 WeakMap ES6 遍历Set