JavaScript

Module

Definition

A self-contained unit of code that exports specific values (functions, objects, classes) and imports what it needs from other modules. ES modules use `import`/`export` syntax.

Code Example

Tip: Modify the code above and click “Run” to see the results

Learn More

Related Terms