Why is there a difference in the way functions are created in javascript?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/336859/javascript-var-functionname-function-vs-function-functionname">Javascript: var functionName = function() {} vs function functionName() {}</a>  </p>
</blockquote>



<p>I have code with functions defined in two ways:</p>

<pre><code>var retrieveData = function (statusValue, statusText)
{
...
}


function retrieveData(statusValue, statusText) {
..
}


retrieveData(1,2);
</code></pre>

<p>Can someone explain what the difference is. Seems that the second way of setting up the function is much simpler.</p>
