'var' legal in for..in?

Allen Wirfs-Brock allen at wirfs-brock.com
Mon Mar 23 14:08:01 UTC 2015


> On Mar 23, 2015, at 2:45 PM, Mark Ethan Trostler <mark at zzo.com <mailto:mark at zzo.com>> wrote:
> 
>> Howdy,
>> Is this legal ES6 syntax:
>> 
>> for (var x in [ 1,2,3 ] ) { ... }  //?
>> 
>> Can the 'var' be in there?  There was alleged talk at some point about making that illegal? Hard to tell from looking at the spec thanks!!

http://people.mozilla.org/~jorendorff/es6-draft.html#sec-iteration-statements <http://people.mozilla.org/~jorendorff/es6-draft.html#sec-iteration-statements> 
7th IterationStatement rule

Allen



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150323/92dafd9d/attachment.html>


More information about the es-discuss mailing list