<div dir="ltr"><div><div>This is already possible:<br></div><div><br></div><div><span style="font-family:monospace,monospace">$ node<br></span></div><div><span style="font-family:monospace,monospace">> console.log('one'); <b>foo:</b> { console.log('two'); <b>break foo;</b> console.log('three'); }; console.log('four')<br>one<br>two<br>four</span><br><br></div>Cheers,<br></div>S├ębastien<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 27, 2017 at 5:40 PM, Sebastian Malton <span dir="ltr"><<a href="mailto:sebastian@malton.name" target="_blank">sebastian@malton.name</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div id="m_-2203779241010210675response_container_BBPPID" style="outline:none;font-size:initial;font-family:"Calibri","Slate Pro",sans-serif,"sans-serif"" dir="auto"> <div name="BB10" id="m_-2203779241010210675BB10_response_div_BBPPID" dir="auto" style="width:100%"> 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 {}.</div><div name="BB10" id="m_-2203779241010210675BB10_response_div_BBPPID" dir="auto" style="width:100%"><br></div><div name="BB10" id="m_-2203779241010210675BB10_response_div_BBPPID" dir="auto" style="width:100%">This would make some code a lot easier to understand as it can eliminate flag variables</div>                            <div id="m_-2203779241010210675blackberry_signature_BBPPID" name="BB10" dir="auto">     <div id="m_-2203779241010210675_signaturePlaceholder_BBPPID" name="BB10" dir="auto"></div> </div></div></div><br>______________________________<wbr>_________________<br>
es-discuss mailing list<br>
<a href="mailto:es-discuss@mozilla.org">es-discuss@mozilla.org</a><br>
<a href="https://mail.mozilla.org/listinfo/es-discuss" rel="noreferrer" target="_blank">https://mail.mozilla.org/<wbr>listinfo/es-discuss</a><br>
<br></blockquote></div><br></div>