Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardJavaScriptWeakRef and FinalizationRegistrySingle-choice MCQ

Within a single synchronous run of JavaScript (one microtask/turn), can WeakRef.prototype.deref return the target on one call and undefined on a later call?

const wr = new WeakRef({ v: 1 }); const a = wr.deref(); // ... no awaits, all synchronous ... const b = wr.deref();