title: What is the difference between declaring a function as a variable?
body: <p>Does this produce the same results? What if function foo does not exist?  </p>
  
  <pre><code>var foo = foo || function(){
    console.log("I'm Batman");
  }
  </code></pre>
  
  <p>vs</p>
  
  <pre><code>var foo = function() {
    console.log("I'm Batman")
  }
  </code></pre>