Array iterator questions
jason.orendorff at gmail.com
Sat Dec 1 08:14:31 PST 2012
1. The current draft spec has Array.prototype.@@iterator() behaving like
for (x of ["a"])
would print the pair ["0", "a"].
The proposal had Array iterators producing values only by default. Why the
(It seems like it could be a typo, or it could be motivated by a desire for
consistency across all collections. If the latter, Map should change, not
2. According to 22.214.171.124.2, the iterators produced by Array.prototype.keys
and .items will expose the index values as strings. Why strings? Don't
numbers make more sense?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss