JavaScript function keyword appears to be preparsed when used declaratively?
<p>I just discovered that the following code executes without error (Chrome):</p>

<pre><code>console.log(fa);
function fa(){}
</code></pre>

<p>I was under the impression that:</p>

<pre><code>function fa(){}
</code></pre>

<p>was identical to:</p>

<pre><code>var fa = function(){};
</code></pre>

<p>My assumption had led me to believe that my code block above should have resulted in an error due to <code>fa</code> not having been declared before it was called. The second form however, when used in my code sample above, will produce an error because <code>fa</code> has not been defined yet when the first line runs.</p>

<p>Is there some documentation or information somewhere that covers the fact that the <code>function</code> keyword, when used declaratively, is preparsed, thus exposing said function in advance of the actual order of operation of the lines of code in a script?</p>
