const WM = new WeakMap();
let obj = {};
let anotherObj = {};
WM.set(obj, 'object data');
WM.set(anotherObj, 'another object data');
obj = null;
// Let's check what's logged
console.log(WM.has(obj));
console.log(WM.has(anotherObj));
Post #1955
7.56K
CHALLENGE
- 👍 9
- ❤ 1