JS Built-ins
WeakMapgetbeginner

WeakMap.prototype.get() β€” basic

πŸ“– Usage Example
const wm = new WeakMap()
const k = {}
wm.set(k, 99)
wm.get(k)  // β†’ 99

get() retrieves the value associated with the given object key.

WeakMap get()

wm.get(key) returns the value associated with the key.

Challenge: Verify basic get.

πŸ’‘ Hints (1)
  • β€’ get() retrieves the value stored for the given key.