const weakmap1 = new WeakMap(); const object1 = {}; const object2 = {}; weakmap1.set(object1, 42); console.log(weakmap1.get(object1)); // Expected output: 42 console.log(weakmap1.get(object2)); // Expected output: undefined