'var' legal in for..in?

Mark Ethan Trostler mark at zzo.com
Mon Mar 23 13:45:17 UTC 2015


> 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!! 
>   Mark


More information about the es-discuss mailing list