For what it's worth, that specific use case would be addressed by https://github.com/tc39/String.prototype.matchAll ;-)
On Wed, Sep 14, 2016 at 4:20 PM, Oriol Bugzilla <[email protected]> wrote: > I like this proposal. Specially for `while` loops. > > When I want to iterate all matches of a global regex, I always think the > variable declaration at the top seems ugly > > ```js > let match; > while (match = regex.exec(string)) { > // ... > } > ``` > > This looks better: > > ```js > while (let match = regex.exec(string)) { > // ... > } > ``` > > _______________________________________________ > 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

