🔰module
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
JS ⟩ module
Modules provide structure to bigger programs by separating the code into pieces with clear interfaces and dependencies.
interface: the part that’s visible from other modules.
dependencies: other modules that it makes use of.
in Node.js, each JS file is treated as a module.
in a module there's no "module scope object" for these top-level s to be added to as .
( 👉 compare: )