Ranges

Mathias Bynens mathias at qiwi.be
Fri Nov 4 17:34:36 UTC 2016


On Fri, Nov 4, 2016 at 6:24 PM, Jordan Harband <ljharb at gmail.com> 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.


More information about the es-discuss mailing list