A WeakMap is a collection of key/value pairs with keys that must be objects, values that can be any JavaScript type, and no strong references to the keys. That is, the presence of an object as a key in a WeakMap does not protect it from being garbage collected.
A Map is an unordered list of key-value pairs in which the key and value can be of any type, such as string, boolean, or number. Every key in a Weak Map can only be an object or a function. It was formerly used to save weak object references. Iterable maps exist. WeakMaps can't be iterated.
WeakMap is a Map-like collection that only accepts objects as keys and eliminates them along with their associated value once they are no longer accessible through other means. WeakSet is a Set-like collection that only stores objects and destroys them after they are no longer available through other means.
Even if the values refer to the keys, WeakMap allows data to be associated with objects in a way that does not prevent the key objects from being collected.
Learner's Ratings
4.9
Overall Rating
86%
14%
0%
0%
0%
Reviews
B
Bakare Oluwatobi
5
The Arithmetic operator explanations cover all this arithmetic operator sign and it is well explanatory with great examples
R
Raktim Ghosh
5
good course and very detailed explanation
S
Sachin
4
good course material
P
Pasalapudi Pujita Sri Naga Santhoshi
5
they has clearly explained and easily understand to all
M
Mohammad Suhail
5
Good trainer
P
Prabhat Yadav
5
Superb and amazing 😍🤩 enjoyable experience.
K
karthikeyan Karthik
5
Thankyou learnvern....
W
William Jimmy
4
This is by far the most comprehensive tutorial I ever come across. I was really excited to discover this amazing tutorial, but unfortunately couldn't continue due to keypad noise which I'm allergic to
V
Vijay Banjara
5
Amazing
V
VAISHNAVI RAJESH CHALKE
5
it helps me to clear my basic conceptual knowledge
Share a personalized message with your friends.