Read Node.js, Require and Exports and Organize Your Code with RequireJS
A way to contain variables/functions/classes and expose them using a module.exports syntax to export everything you specify.
With Require.js, the code is written in self contained modules using define(). This allows you to require() the modules in a main.js file, and require only the main JS file in the HTML script tag.
👍