Map with weakly-held object keys for memory-safe caches.
- Category: JS Collections — part of the JavaScript Tutorial on GoCareerGo
- Read the short summary above, then check the linked docs for full syntax/behaviour
- Interview tip: be ready to explain "WeakMap Basics" in one sentence, then back it up with a tiny example
// WeakMap Basics — minimal example
console.log("WeakMap Basics");Tip
Quick recall: "WeakMap Basics" — map with weakly-held object keys for memory-safe caches.