Break out of non-loops

Sébastien Doeraene sjrdoeraene at
Fri Oct 27 15:47:14 UTC 2017

This is already possible:

$ node
> console.log('one'); *foo:* { console.log('two'); *break foo;*
console.log('three'); }; console.log('four')


On Fri, Oct 27, 2017 at 5:40 PM, Sebastian Malton <sebastian at>

> Something that is very useful that was recently released into Rust was the
> idea of using a break statement to break out of the current level. This is
> already the case for loops but in Rust it was extended to all statements
> encased in {}.
> This would make some code a lot easier to understand as it can eliminate
> flag variables
> _______________________________________________
> es-discuss mailing list
> es-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list