What is the key difference between a named export and a default export in ES modules?
- aNamed exports can only export functions, default exports can export any value
- bA module can have unlimited default exports but only one named export
- cDefault exports require the
exportkeyword to be written twice - dA module can have multiple named exports but only one default export✓
Explanation:ES modules support two independent export mechanisms in the same file: any number of named exports (imported with
{ name }, matching the exported identifier) and at most one default export (imported with any local name, e.g. import whatever from './mod.js').