# Modules in JavaScript

Modules in JavaScript: Modules: import and export.

Updated: November 14, 2026

1. [Modules: import and export](https://www.ask-codey.com/lessons/javascript-modules-import-and-export) (Apprentice): 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.

Source: https://www.ask-codey.com/courses/javascript-in-depth/topics/javascript-modules
