Array extras functionality for iterators
wycats at gmail.com
Tue Feb 28 09:06:50 PST 2012
Catching up on this discussion.
Personally, I'd like to see us come to quick consensus on `forEach` for
collections, because without something like `forEach`, it's impossible to
implement useful versions of these collections in user-space in browsers
that do not implement for-of.
Indeed, the current browsers that implement Map and Set do not implement
for-of, which means that even though browsers implement the collections
(and Mozilla has for a bit now), they are not very useful because they
cannot be iterated over. Had `forEach` been part of the initial spec, I
would be using them today.
One last thing: `forEach` on `Map` should probably pass the key and value
to the function.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss