Please consider the official ECMAScript specification as the source for your answer, and not a document published by a specific browser vendor. (I am aware of Mozilla extend
I'm not sure how to read this, but ECMA-262 V5 has this to say:
NOTE Several widely used implementations of ECMAScript are known to support the use of
FunctionDeclaration
as a Statement. However there are significant and irreconcilable variations among the implementations in the semantics applied to such FunctionDeclarations. Because of these irreconcilable difference, the use of a FunctionDeclaration as a Statement results in code that is not reliably portable among implementations. It is recommended that ECMAScript implementations either disallow this usage of FunctionDeclaration or issue a warning when such a usage is encountered. Future editions of ECMAScript may define alternative portable means for declaring functions in a Statement context.
If I understand this correctly, strictly speaking, this means that function declarations can't be inside blocks at all, because Blocks can contain only Statements.
I can be totally wrong with my interpretation, though - I am not familiar with the internal workings of ECMAScript.