A WeakSet only stores _________, and its elements are garbage collected when there is no other reference to them.

  • Objects
  • Primitives
  • Arrays
  • Functions
A WeakSet only stores objects, and its elements are garbage collected when there is no other reference to them. WeakSets are useful for holding "weak" references to objects, meaning they won't prevent an object from being garbage collected.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *