title: JavaScript - Declaring Global Scope for Nested Function?
body: <p>My attempts at giving global scope to a nested JavaScript function are not working:</p>
  
  <pre><code>//DECLARE FUNCTION B IN GLOBAL SCOPE
  function B;
  
  function A() {
  
      //DEFINE FUNCTION B INSIDE NEST
      B() {
          alert("function B is running");
      }
  }
  
  //CALL FUNCTION B FROM GLOBAL SCOPE
  B();
  </code></pre>
  
  <p>This is just curiosity -- you are correct that I don't really have any good reason to want to do this.</p>
  
  <p>TIA -- I don't have an SO account to respond to your answers...</p>