JS Built-ins
WeakSetbeginner

WeakSet β€” add and has

πŸ“– Usage Example
const ws = new WeakSet()
typeof ws  // β†’ 'object'

WeakSet instances are objects with no size property or iteration.

WeakSet add/has

After ws.add(obj), ws.has(obj) is true.

Challenge: Verify basic add/has usage.

πŸ’‘ Hints (1)
  • β€’ Only objects can be added to WeakSet.