title: What is the difference between a node module and a regular javascript file
body: <p>Recently I had some experience in writing a very basic Node.js application. But I am a bit confused about the difference between a Node.js module and a JavaScript one. For instance, I can get advantage of the <code>underscore</code> library in both Node.js and JavaScript like below:</p>
  <p><strong>Node.js</strong></p>
  <pre><code>var _ = require(&quot;underscore&quot;);
  _.each([1, 2, 3], console.log);
  </code></pre>
  <p><strong>JavaScript</strong></p>
  <pre><code>&lt;script src=&quot;path/to/underscore.js&quot;&gt;&lt;/script&gt;
  _.each([1, 2, 3], console.log);
  </code></pre>
  <p>And I get the exact same result. The point which confuses me is that is it really necessary to have client side coding that runs in browser, while we can handle all of them within a node module?</p>