Does JavaScript store reference to every element in array of ints?

147 views Asked by At

In C\C++, Java, C# code like this

arr = new int[5];

will be stored in memory using 5 * 4 = 40 bytes, since every int just a 32 bits number.

Is it true for JavaScript? Or does it store ints as references to the objects that contain boxed ints?

0

There are 0 answers