block scope and function declarations

Andy Wingo wingo at igalia.com
Wed Feb 15 06:14:00 PST 2012


On Wed, 2012-02-15 at 12:55 +0100, Andy Wingo wrote:

>   function f(x) {
>     bar(); // ???
>     for (let y of x) {
>       function bar() { ... y ... }
>       bar(); // OK
>     }
>     bar(); // ??? 
>   }

Did I just get wtfjs'd here?  Is this `bar' not a source element, and
therefore this is a function expression and not a declaration?

Sheepishly yours,

Andy


More information about the es-discuss mailing list