
Modules let you split code across multiple files. Use export to make a function or variable available to other files, and import to bring it in. Named exports: export const add = ... imported as import { add } from './math.js'. Default exports: export default myFunction imported as import myFunction from './math.js'.
Reference:
TaskLoco™ — The Sticky Note GOAT