|
|
|
|
|
by boucher
5582 days ago
|
|
I'm curious, why do you need to make a distinction? Is there some other feature of CS that depends on it? Certainly 'for key, value of array' could be implemented with numerical keys. If using just 'for value of dict' is allowed that would also work fine. |
|
Ideally, JavaScript would have supported a single iteration protocol for both arrays and objects from the get-go, but alas...