loading...

re: When is an array, not an array? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Just a few days back I was reading about data structures, arrays and linked lists and wondered that I should take a look how arrays in javascript w...
 

Yep! Looks like the "normal" use case is generally implemented as a dynamic array underneath. So the engine will pick an array size to start, and if you exceed it then it will create a new bigger array. This is supposed to work really well in practice, since it's not common to individually add so many items to an array. I would love to know the default starting size!

en.wikipedia.org/wiki/Dynamic_array

Code of Conduct Report abuse