Learn about named exports and imports and how to export functionality from the modules.
Named exports and imports
ESM allows us to export functionality from a module through the export
keyword.
Note: ESM uses the singular word
export
as opposed to the plural (exports
andmodule.exports
) used by CommonJS.
In an ES module, everything is private by default, and only ...