title: Javascript include namespace
body: <p>I've a file foo.js with a namespace like this:</p>
  
  <pre><code>// foo.js
  const Foo = {
  
    hello: () =&gt; {
      console.log('Hello world!');
    }
  
  }
  
  module.exports = Foo
  </code></pre>
  
  <p>Now in my file imports.js i can do this:</p>
  
  <pre><code>// imports.js
  global.Foo = require('./foo.js');
  </code></pre>
  
  <p>so in any js files I can call <code>Foo.hello();</code></p>
  
  <p>Now the question is: in a specific js file is there a way to call <code>hello()</code> without <code>Foo</code>, like <code>using namespace Foo</code> of C++?</p>