We are currently studying arrays in computer science and how they occupy a continuous range of memory space.
In a traditional array, you are unable to insert or delete elements without shifting other elements around.
For example:
const arr = ['a', 'b', 'd'];
arr.splice(2, 0, 'c'); // arr now equals ['a', 'b', 'c', 'd']
Does this mean that arrays are not handled as typical arrays in JavaScript?
Could it be using a linked list instead?
I'm not looking for detailed specifications, but rather in a common implementation of the language in browsers or Node.js, what method is likely being employed?
This 10 year old+ Q/A discusses the topic but doesn't give a clear answer, so please do not flag it as a duplicate.
The actual underlying representation may vary between different browsers (or maybe not).
What is the most probable underlying data structure being used?