Initializer expression on for-in syntax subject

Geoffrey Garen ggaren at
Fri Mar 14 14:17:11 PDT 2014

> JSC has been trying to kill off the initialiser expression in the for(in) statement, but we've encountered a bunch of reasonably significant content that breaks with it disallowed (a particularly prominent one currently is, so we will be bringing back support for
> for (var Identifier = Expression in Expression)

I suggested to Oliver that we accept "Identifier = Expression in Expression” as valid syntax, but drop "= Expression” from the parse tree after the fact. That way, we can still almost completely remove the construct from the language without harming web compatibility.

I don’t see much value in making this decision based on strict mode. So far, we’ve got nothing but trouble from policies like that.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list