const empty = new WeakSet(); const sports = {}; const obj = new WeakSet([ sports ]);
const fn = () => {}; const obj = new WeakSet([ fn ]); console.log(obj.has(fn)); // true
const obj = new WeakSet(); const fn = () => {}; obj.add(fn); console.log(obj.has(fn)); // true
const fn = () => {}; const obj = new WeakSet([ fn ]); console.log(obj.delete(fn)); console.log(obj.has(fn)); // true // false