Organize and share code between files using ES6 modules.
As applications grow in complexity, keeping all your code in a single file becomes unmanageable. ES6 Modules provide a standardized, native way to organize your JavaScript code into separate, reusable files. The core concepts are `export` and `import`. The `export` keyword is used to make variables, functions, or classes from one file (the module) available to other files. You can have multiple *named exports* from a single file, or you can have a single *default export*. A file can have both, but it's common practice to stick to one style per module for clarity. The `import` keyword is used in another file to bring in the exported functionality. For named exports, you use curly braces `{}` to specify which exports you want to import. For a default export, you can import it with any name you choose. Modules help in creating a clear dependency graph, improve code maintainability by promoting separation of concerns, and prevent pollution of the global namespace because variables declared in a module are scoped to that module by default. To use ES6 modules in the browser, you must add `type="module"` to your `<script>` tag. This system is the foundation of modern JavaScript development frameworks and build tools.