const obj = { name: 'test' } const ref = new WeakRef(obj) obj.name // β 'test'
Holding a WeakRef does not keep the object alive on its own.
new WeakRef({x: 1}).deref().x === 1.
new WeakRef({x: 1}).deref().x === 1
Challenge: Verify property access through deref.