ECMAScript 5.1 does not syntactically permit a FunctionDeclaration to directly
appear nested within a Block. The semantics provided by the specification are
those for a function declaration at the top level of a function. The only
standard way to evaluate a function declaration within a
Allen Wirfs-Brock wrote:
Some implementations bind the function name scoped to the block others bind
the name scoped to the enclosing function.
Detailed aside: no standard implementation actually binds to a block
scope (yet -- this is proposed for ES6 and implementations are
appearing,
(Resending on behalf of 张立理 otakus...@live.com because his mail
didn't go through.)
According to [section 13 Function
Definition](http://ecma-international.org/ecma-262/5.1/#sec-13) of
ECMAScript-262 5.1, the **Function Declaration** production and the
**Function Expression** production are
3 matches
Mail list logo