# 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.

![Cheat sheet: Modules: import and export](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/10/6f4e5729318846858046d2f3060325b6.webp)

- Category: JavaScript
- Level: Apprentice
- Tags: Default Export, ES Module, JavaScript, Module script, Named Export, package.json (javascript), software-development
- Updated: November 1, 2026

Source: https://www.ask-codey.com/cheat-sheets/javascript-modules-import-and-export-cheat-sheet
