# ES Modules

ES Modules (ECMAScript Modules) are a standardized way to include dependencies in JavaScript. They are a built-in feature of the JavaScript language and are used to import functions, objects, or primitives from one module to another.

ES Modules are useful because they allow you to organize your code into smaller, reusable pieces that can be imported as needed. This helps to make your code more maintainable and easier to understand. It also enables you to share code between different projects, which can save time and effort.

ES Modules use a specific syntax for exporting and importing values. For example, you can use the `export` keyword to make a value available for import by other modules, and the `import` keyword to import a value from another module.

```javascript
// In a module called "math.js"
export function add(a, b) {
  return a + b;
}

export function subtract(a, b) {
  return a - b;
}

// In a different module
import { add, subtract } from './math';

console.log(add(1, 2)); // 3
console.log(subtract(1, 2)); // -1
```

ES Modules are an important part of modern JavaScript development and are widely used in front-end and back-end applications.
