ES modules let you split code into files that export their items with export and import them with import. Each module has its own scope. A default export is unique; named exports can be multiple. Browsers load them with <script type="module">.
Example
// outils.js
export const double = (x) => x * 2
// app.js
import { double } from './outils.js'