To add a value to a WeakSet, use the .add() method. This method is chainable.
.add()
const obj1 = {}, obj2 = {}; const weakset = new WeakSet(); weakset.add(obj1).add(obj2);