FWIW: got bitten from same thing too ... the fact `for(const x of ...)` works would always mislead me to think a `for(const i; ... i++)` would too, even if it's completely different meaning/issue/matter.
Oh well On Fri, Nov 4, 2016 at 5:34 PM, Mathias Bynens <[email protected]> wrote: > On Fri, Nov 4, 2016 at 6:24 PM, Jordan Harband <[email protected]> wrote: > > Here you go: > > > > 1) `function* range(start, end) { for (const i = +start; i < end; ++i) { > > yield i; } }` > > For future reference: `++i` throws when `i` is a `const` binding. The > intended example uses `let` instead. > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

