title: Function declarations inside if/else statements?
body: <p>How are function declarations handled?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var abc = '';
  if (1 === 0) {
    function a() {
      abc = 7;
    }
  } else if ('a' === 'a') {
    function a() {
      abc = 19;
    }
  } else if ('foo' === 'bar') {
    function a() {
      abc = 'foo';
    }
  }
  a();
  document.write(abc); //writes "foo" even though 'foo' !== 'bar'</code></pre>
  </div>
  </div>
  </p>
  <p>This example produces different outputs in Chrome and Firefox. Chrome outputs <code>foo</code> while FF outputs <code>19</code>.<br /></p>