Intermediate JavaScript
Q42 / 100

What is the WeakMap?

Correct! Well done.

Incorrect.

The correct answer is B) A Map keyed by objects with weak references — entries are garbage collected when the key object has no other references

B

Correct Answer

A Map keyed by objects with weak references — entries are garbage collected when the key object has no other references

Explanation

WeakMap keys must be objects. When the object is collected, the entry is removed automatically. WeakMap is not enumerable.

Progress
42/100