What is `WeakSet` in JavaScript and how does it differ from `Set`?

JavaScript Medium
Select the correct answer: Single Choice

Key points

  • WeakSet holds objects with weak references
  • WeakSet is non-iterable and lacks a size property
  • Set can store any value type and is iterable with a size property

Ready to go further?