search

Home  >  Q&A  >  body text

javascript - How to store data underneath an array

I would like to ask how the data is stored at the bottom of the array. Please give me an answer. Thank you.

迷茫迷茫2743 days ago613

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-05-17 10:00:36

    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.

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-17 10:00:36

    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...

    reply
    0
  • Cancelreply