Letting RegExp method return something iterable?
brendan at mozilla.com
Mon Aug 26 16:23:31 PDT 2013
Andrea Giammarchi wrote:
> Is it very useful because you wrote for instead of while ?
> while (m = re.exec(str))
It is, for two reasons:
1. in JS only for can have a let or var binding in the head.
2. the utility extends to all for-of variations: array comprehensions,
More information about the es-discuss