Weakmap,Weakset,Set,Map

  • Set is similar to the array, but it ensure that all the value are unique.
  • Map is similar to the object, but the key of the map can be object.
  • Weakmap and weakset can’t be iterated.
  • WeakMap and WeakSet means all the item in these collection are weakly referenced to the origin object and will not influence the GC.

WeakMap的学习和使用

你可能感兴趣的:(js)