What's the difference between this two ways of defining a function 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>Way 1:</p>

<pre><code>function fancy_function(){
    // Fancy stuff happening here
}
</code></pre>

<p>Way 2:</p>

<pre><code>var fancy_function = function(){
    // Fancy stuff happening here, too.
}
</code></pre>

<p>I use the former when I'm just defining a "normal" function that I'm gonna use one or several times and the latter when I'm passing it a callback for another function or so, but it looks to work fine in the both ways.</p>

<p>Is it really a difference in some way?</p>
