Effect of assigning JavaScript function to variable
<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>In JavaScript, I can define a function and assign it to a variable:</p>

<p><code>var myVar = function myFunc(){};</code></p>

<p>or define the function standalone:</p>

<p><code>function myFunc(){};</code></p>

<p>What are the use cases for the first approach?</p>
