WeakMap
Term side of the Card
Topic: Map
Unit title: WeakMap
Categories: Object
Explanation side of the Card
Explanation: The object that holds a collection of key-value pairs where keys are objects and values can be any value. The keys are weakly held, meaning if there are no other references to a key object, it can be garbage collected. This avoids memory leaks.
Browser compatibility:
- The chrome browser supports this feature starting from version 36
- The edge browser supports this feature starting from version 12
- The firefox browser supports this feature starting from version 6
- The safari browser supports this feature starting from version 8
Availability: