Memory consumption of arrays and objects in JavaScript?

A array generated by the

for loop and object , why does the array take up more memory than the object? The code is shown below (running on the node command line, as well as in the browser):

:

Apr.19,2022
The

array maintains a length attribute


if you think of it this way.. An array is actually an object and is extended on the basis of the object. Then the array will have one more layer of data than the object, so is it surprising that it takes up a little more memory?

[].__proto__.__proto__ === {}.__proto__  // true
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e62cdc-459ed.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e62cdc-459ed.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?