ES Modules (import / export) in JavaScript
🟢 Beginner Level | JavaScript Core Syntax
📖 Definition
ES Modules (ESM) offer standard browser & Node.js module syntax using export and import statements.
âš¡ Code Example
// math.js
export const add = (a, b) => a + b;
export default function multiply(a, b) { return a * b; }
// main.js
import multiply, { add } from './math.js';
🧠Navigation
← Module Hub | Module Hub | 02. CommonJS & Node.js Modules →