2 ms·
This functionality makes perfect sense as soon as you realise that at its core JavaScript only has a single data structure, and that is objects (aka dictionarie
by halo 17y ago
This functionality makes perfect sense as soon as you realise that at its core JavaScript only has a single data structure, and that is objects (aka dictionaries, associative arrays or hashmaps), and arrays are simply a special case with some syntactic sugar built on top of it
I actually think that it's one of JavaScript's better ideas, it's just a shame that the JavaScript doesn't have very strong getter/setter/subscripting functionality so you could implement data structures like JavaScript arrays completely in native JavaScript.