restrictions on let declarations
brendan at mozilla.com
Thu Jan 30 12:49:54 PST 2014
John Lenz wrote:
> I don't argue that it isn't a useless "let". I do point out that in
> "sloppy" mode, that other declaration are allow in practices by
> browsers. Chrome allows function, const, and var in the body of an if
> without block.
But those aren't useless.
They are quirky, but they do not bind in the consequent only, which is
exactly what you and John said you wanted for if(x)let y=z.
More information about the es-discuss