Question 5 of 5Pro Only
What are JavaScript modules, and what is the difference between named exports and default exports?
Sample answer preview
JavaScript modules are a way to split code into separate files, each with its own scope. Modules help organize code, avoid global namespace pollution, and enable code reuse. Each file is a module with its own scope. Variables and functions are private by default.
importexportdefault exportnamed exportES modulesCommonJS