miktam / sizeof

Get size of a JavaScript object
MIT License
301 stars 45 forks source link

Different size in chrome and mozilla #65

Closed mahsashadi closed 1 year ago

mahsashadi commented 2 years ago

Why size-of logs two different size in Chrome and Firefox, for a complicated object, by using console.log().

console.log('mywin size is:',  sizeof(win));

// Result:
mywin size is: 22923784    //logs in Chrome
mywin size is: 37458302    //logs in Firefox

@miktam

agiangrant commented 2 years ago

Firefox and Chrome are different browsers. Wouldn't that mean the Window object would also be different? I don't think we can expect the Window object to be the same size.