On 02/06/2013, at 01:12, Axel Rauschmayer wrote:
>
>
>> for example I can exit a function at any point with a return, but can I exit
>> a block at any point with a break or something?
>
> You can give the block a label, say, `foo` and then exit via `break foo`.
So should I break to a label *outside* the block? Like so?
{
//...
while (condition) {
//...
if (something) break resume;
//...
}
//...
}
resume:
>> Also a function returns a value, does a block evaluate to something?
>
> No it doesn’t. David Herman proposed a “do expression” that would be able to
> do so:
> http://wiki.ecmascript.org/doku.php?id=strawman:do_expressions
Do expressions are cool! Are they in for es6?
Thanks.
--
( Jorge )();
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss