In JavaScript, the word module has changed over the years. A module used to be any piece of code that was distinct and self-contained. A few years ago, you might have expressed several modules within the same file like so:
// main.js
// The Dropdown Module
var dropdown = /* ... definition ... */;
// The Data Fetcher Module
var dataFetcher = /* ... definition ...*/;
Nowadays, however, the word module tends to refer to Modules (capital M) as prescribed by the ECMAScript specification. These Modules are distinct files imported and exported across a code base via import and export statements. Using such Modules, we might have a DropdownComponent.js file that looks like this:
// DropdownComponent.js
class DropdownComponent {}
export default DropdownComponent;
As you can see, it uses the export statement to export its class. If we wish to use this class as a dependency...