3 ms·
The javascript spec makes it clear that an 'array' is just an object with a magic length property that is always one bigger than the largest set numeric index.
by kybernetikos 8y ago
The javascript spec makes it clear that an 'array' is just an object with a magic length property that is always one bigger than the largest set numeric index.
The array syntax can be thought of as a shorthand where you want the indexes inferred from order instead of having to list them out. There are obviously a few useful methods that you use on arrays but almost all of these will work on any object with a length if you .call or .apply them.