So I am running this code
function somefunc() {
return new WeakMap();
}
somefunc.prototype = new WeakSet();
var wm = new somefunc();
wm instanceof WeakMap //true
wm instanceof WeakSet //false
I wanted to ask why isn't wm
an instance of WeakSet
, because according to the example given here, wm
should be an instance of Weakset
.