Adding a value

suggest change

To add a value to a WeakSet, use the .add() method. This method is chainable.

const obj1 = {},
      obj2 = {};

const weakset = new WeakSet();
weakset.add(obj1).add(obj2);

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


WeakSet:
*Adding a value

Table Of Contents
16Map
17Set
90WeakSet