This thread has a few errors in it. The methods are called entries, keys and values. entries is the default iterator (Map.prototype.entries = Map.prototype[@@iterator]). entries, keys and values returns an iterator (not an Array). That is an object that as a next method that returns {value: any, done, boolean}. FWIW, for-of is available in Chrome too (behind a flag though :'( ) On Thu, Jun 20, 2013 at 7:40 PM, Alan Cutter <alancutter@chromium.org>wrote: > That clears things up. Thanks for clarifying! > > > On 21 June 2013 05:12, Tab Atkins Jr. <jackalmage@gmail.com> wrote: > >> On Thu, Jun 20, 2013 at 11:20 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote: >> > On 6/20/13 1:41 PM, Tab Atkins Jr. wrote: >> >> When we get for-of loops >> > >> > What's this "when"? They've been shipping for a year now in Firefox. >> ;) >> >> I know, but *we* (Blink) don't have them yet. ;_; >> >> >> it'll automatically >> >> iterate with whichever one is default for Maps, which I think is >> >> .keys(). >> > >> > It's items(), as far as I can tell from the spec and a basic test. >> >> Ah, kk. >> >> ~TJ >> >> > -- erikReceived on Tuesday, 2 July 2013 13:29:20 UTC
This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:32 UTC