for statement with index and value

Alexander Jones alex at weej.com
Tue Jul 14 18:49:45 UTC 2015


It's called `enumerate` in Python. And it's trivial to implement:

```js
for (let [i, value] of enumerate(someIterable)) {
   // behold...
}
```

On Tuesday, July 14, 2015, Domenic Denicola <d at domenic.me> wrote:

> From: Tingan Ho [mailto:tingan87 at gmail.com <javascript:;>]
>
> > But they aren't clean solutions to a wildly popular problem.
>
> I disagree.
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org <javascript:;>
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150714/319d71fd/attachment.html>


More information about the es-discuss mailing list