title: Nodejs Global Functions
body: <p>I have a very basic function that looks like this, it is in a file called <code>functions.js</code></p>
  
  <pre><code>function echo(input){
      process.stdout.write(echo);
  }
  </code></pre>
  
  <p>When I add the file and call <code>echo()</code> like so:</p>
  
  <p>Main file:</p>
  
  <pre><code>require("functions.js");
  require("another_file.js");
  </code></pre>
  
  <p><strong>another_file.js</strong></p>
  
  <pre><code>echo("hello!");
  </code></pre>
  
  <p>It is giving me the following error:</p>
  
  <pre><code>ReferenceError: echo is not defined
  </code></pre>
  
  <p>Is there a way for me to make a function that is global like that without havingin to use <code>exports</code>?</p>