3 ms·
But the "oddity" is that unlike many languages there are only string keys. Many languages implement the array type as a map but still distinguish between a[17]
by justincormack 15y ago
But the "oddity" is that unlike many languages there are only string keys. Many languages implement the array type as a map but still distinguish between a[17] and a["17"].
- city41 15y agoMaybe I'm missing the point. I don't see how that is an oddity as all objects in JavaScript only allow string keys. edit: JavaScript arrays are odd in general since they are just objects designed to look like "true" arrays. I guess I'm so used to that now that nothing about them feels "odd" anymore.