Modules: import and export

A module is a file that shares only what it exports; another file imports it by name (a named export) or under a name it picks (the default export), and a package.json in Node or type="module" on a page makes it run.

Updated

Cheat sheet: Modules: import and export
Category
JavaScript
Level
Apprentice
Tags
Default Export, ES Module, JavaScript, Module script, Named Export, package.json (javascript), software-development