Specific can see http://es6.ruanyifeng.com/#docs/set-map
The SET
1. members can not repeat
2. The only key value, not the name of health, somewhat similar to the array.
3. Can traversal methods have the Add, the Delete, has
weakSet
- Members are subject
- Members are weak references, you can disappear at any time. DOM node can be used to save, not likely to cause a memory leak
- You can not traverse, the method has the Add, the Delete, has
the Map - Is a collection of key value pairs in essence, a similar collection
- May traverse, many ways, can do with a variety of data format conversion
weakMap
1. directly affected by the object name as Jian (excluding null), other types of values are not accepted as the name of health - Kin name is pointing to objects, not included in garbage collection
- Can not traverse, the method with get, set, has, delete