I am working with a WeakMap
that looks like the following:
let newObj = new WeakMap();
let key1={"a":1};
let key2={"b":2};
let key3={"c":3};
newObj.set(key1,"value1");
newObj.set(key2,"value2");
newObj.set(key3,"value3");
Is there a method to determine the number of keys stored in newObj
?
I attempted using Object.keys(newObj).length
, but it seems to be returning 0.