On Jul 19, 2008, at 12:25 AM, Brendan Eich wrote: > * ES3.1 and ES4 will both allow ‘function’ inside control flow > statements [directly inside an explicit block, not as the lone > unbraced consequent statement of an if, while, etc. /be], and it > will be hoisted to the top of the block and initialized on block > entry (to be compatible with how functions behave in ES3) >
What's the behavior of an if/else control flow statement that contains a function definition in each explicit block? if (true) { function x() { return 1; } } else { function x() { return 2; } } _______________________________________________ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss