To support CommonJS, Node uses the
require() function. With
<script> tags, instead calling
require() with the name of the module/dependency that you need and assigning it to a variable.
To illustrate how CommonJS modules work, let's write a Node module and see how to use the
require() function. The following code shows a simple module that exposes a simple object with the method...