title: Call a 'global' function from an object's method
body: <p>I would like to call a function from an object's method. The function is declared in the same scope as the object:</p>
  
  <pre><code>function a() {
     return {
        propA: 'something'
     }
  }
  
  var b = {
     func: function() {
        var a = a(); //Uncaught TypeError: a is not a function
        console.log(a);
     }
  }
  
  b.func();
  </code></pre>
  
  <p>Is there any way how to call <code>a</code> in <code>b.func</code> without setting it as a property of the <code>window</code> object or passing it as a parameter? Thank you.</p>