JS Built-ins
WeakSetdeletebeginner

WeakSet.prototype.delete() β€” independent objects

πŸ“– Usage Example
const ws = new WeakSet()
const o = {}
ws.add(o)
const ok = ws.delete(o)
ok  // β†’ true

The boolean return value tells you if the removal succeeded.

WeakSet delete() Isolation

Deleting one object doesn't affect others in the set.

Challenge: Verify deletion isolation.

πŸ’‘ Hints (1)
  • β€’ Each object is independently managed in the WeakSet.