Difference between JavaScript function declarations?
<p>Why does calling my JavaScript function throw an error when I call it like this</p>

<pre><code>wysiwyg2();

var wysiwyg2 = function()
{
    alert(1);
}
</code></pre>

<p>but work when I do this?</p>

<pre><code>wysiwyg2();

function wysiwyg2 ()
{
    alert(1);
}
</code></pre>
