In ES6, do for loops with a let/const initializer create a separate scope?
Michael Zhou
zhoumotongxue008 at gmail.com
Mon Jun 16 11:29:34 PDT 2014
Thanks for the clarification, one detail about the order between
incrementing and setting $$lastIteration_i:
{
let i = $$lastIteration_i; //create and initialize per iteration i
if (!(i<10)) break;
{
let i;
}
* i++;
$$lastIteration_i = i;*
}
Should it be*
$$lastIteration_i = i;
i++;
*instead, given what the spec says?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140616/71d8f1d0/attachment.html>
More information about the es-discuss
mailing list