|
|
|
|
|
by qsort
1999 days ago
|
|
It's extremely consistent. I'd say that's the only consistent way to do it, if you want to preserve the semantics of JS objects. Lua does pretty much the same. > Saying that they're objects is not reasonable. This is a fair point, in the alternate universe where JS objects have different semantics. > in most languages lists are objects, and they don't also do key-value pairs at the same time This is a dynamic language we're talking about. You are very welcome to think dynamic languages are inferior choices, an opinion that I personally would share, but that's a discussion for another time. In the context of JS, that behavior is neither unreasonable nor inconsistent. |
|