What is the output of the following? “`js const a = { val: 1 }; const b = { val: 2 }; const weakSet = new WeakSet([a, b]); console.log(weakSet.has(a)); console.log(weakSet.size); “`

JavaScript Developer Hard

JavaScript Developer — Hard

What is the output of the following? “`js const a = { val: 1 }; const b = { val: 2 }; const weakSet = new WeakSet([a, b]); console.log(weakSet.has(a)); console.log(weakSet.size); “`

Ready to go further?

Related questions