Concept
import and export split code into files with explicit dependencies. Named exports keep names consistent across files; a default export is one main thing per file.
The tutor works through these with you, in conversation and code. A session ends when you have shown them, not when a video does.
A few lines that show ES modules doing its job.
// money.ts
export function format(cents: number): string {
return "$" + (cents / 100).toFixed(2);
}
export const ZERO = 0;
// cart.ts
import { format, ZERO } from "./money.js";
import type { Item } from "./types.js";
export default function total(items: Item[]) { return format(ZERO); }Creating an import cycle, where a.ts imports b.ts which imports a.ts. One side sees an undefined binding at load time, and the failure appears only in some entry points.
Your roadmap puts these before ES modules, unless you already know them.
Once a session shows you understand ES modules, it comes back for review. Each review takes a minute and tells the memory model how well you still know it.
Topics that build on ES modules.