Contiguous in physical memory. When the array is created, the length must be specified, then a fixed-size memory will be opened in the memory to store the array.
I don’t know which language you are asking about Arrays in JavaScript are of variable length, and the element types can be different, so the bottom layer should be hashTable or something like that. Arrays in Java are of fixed length, and the element types are also the same. So it is a piece of physically continuous memory. I am just a novice, waiting for a more professional answer...
Contiguous in physical memory.
When the array is created, the length must be specified, then a fixed-size memory will be opened in the memory to store the array.
I don’t know which language you are asking about
Arrays in JavaScript are of variable length, and the element types can be different, so the bottom layer should be hashTable or something like that.
Arrays in Java are of fixed length, and the element types are also the same. So it is a piece of physically continuous memory.
I am just a novice, waiting for a more professional answer...