ES6 Modules
2021-9-6 Less than 1 minute
# ES6 Modules
# What problem does using exports solve?
Using exports allows other modules to import them. When exporting an importing, it helps keep your line of code down.
# How does export differ from export default?
You can have multiple exports in a file, but only one export default. They can be used to achieve the same purpose. You want to use export default to specify the default output for the module; you won't need to know the variable name of the module to load.
# What is a benefit of using the Module System?
Modules can eradicate naming conflicts. Also, using ES6 your code can be organized better.