Are named functions or anonymous functions preferred 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>There are two possible methods for pulling out a function in Javascript:</p>

<pre><code>var foo = function() { ... }
</code></pre>

<p>(this is a bit contrived; another common pattern is:</p>

<pre><code>var foo = {
    baz: 43,
    doSomething:function() {
        ...
    }
}
</code></pre>

<p>)</p>

<p>versus</p>

<pre><code>function foo() { ... }
</code></pre>

<p>Is there an explicit reason to prefer one or the other?</p>
