What is the order of execution of declarations in JavaScript?
<pre><code>&lt;script type="text/javascript"&gt;
        function func(){
        }
        var foo="foo";
&lt;/script&gt;

&lt;script type="text/javascript"&gt;
        var foo="foo";
        function func(){
        }
&lt;/script&gt;
</code></pre>

<p>At the beginning, when func is a function and foo is "undefined", but I want to know which is the first to be defined, func or foo?</p>
