On Wed, Mar 28, 2012 at 3:26 PM, Kevin Smith <[email protected]> wrote:
> - Incorrectly using "return" for those that don't fully understand TCP.
>>
>
> As an illustration, consider this case:
>
> element.onclick = (evt) => do {
>
> if (this.alreadyWaitingForAjaxResponse)
> return;
>
> this.startAnAjaxRequest();
> };
>
> Presumably the early return will throw an exception, since the binding
> context has exited before the event handler is called. (Please correct me
> if I'm wrong.)
>
I agree with your presumption and would hope that, as it does today, do {
return "x"; } would continue to throw the exception SyntaxError: Illegal
return statement.
var i = 0; do { i++; return "x"; } while(!i);
> SyntaxError: Illegal return statement
var i = 0; do { i++; "x"; } while(!i);
> "x"
Rick
> kevin
>
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss