Throwing StopIteration in array extras to stop the iteration

Jason Orendorff jason.orendorff at
Mon Mar 4 15:31:48 PST 2013

On Sun, Mar 3, 2013 at 12:45 PM, David Bruant <bruant.d at> wrote:

>         [2, 8, 7].forEach(function(e){
>             if(e === 8)
>                 throw StopIteration;

This would be taking a piece of one low-level protocol, and using it for a
sorta-kinda related thing that actually, on closer inspection, has nothing
to do with that protocol. Array.prototype.forEach doesn't even use

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list