What does this program print?

from WeakMap and WeakSet
Node 24 intermediate 2 min

What does this program print?

JavaScript
const key = {};
const cache = new WeakMap([[key, undefined]]);

console.log(cache.has(key), cache.get(key));
console.log(cache.has({}), cache.get({}));
Open in playground
Report an error