2 ms·
Of course one funny aspect of the JS number type var a = new Array(); a["4294967294"] = "foo"; console.log(a.length); gives a.length as 4294967295, whereas
by bryanrasmussen 10y ago
Of course one funny aspect of the JS number type
var a = new Array();
a["4294967294"] = "foo";
console.log(a.length);
gives a.length as 4294967295, whereas if I did
var a = new Array();
a["4294967295"] = "foo";
console.log(a.length);
it gives a.length as 0.