JavaScript modules: You can divide your JavaScript code into various files using modules. This makes maintaining a code base simpler. Modules also rely on the script> tag's type = "module" attribute.
modules: is Just a file, a module.One module is one script. Modules can load one another and employ specialised directives in that manner. To exchange functionality, call functions from one module into another using export and import.
The export keyword: Variables and functions marked with the export keyword should be used outside of the current module.
The import keyword: enables the importation of features from other modules.
Common j's module: The original method of packaging JavaScript code for Node.js was using Common J's module.
Common j's all of the dependencies for project are stored in one file or together in one file called node modules.
ES module: This standard, which debuted with ES6, was introduced in 2015. The goal was to provide these functionality in browsers while standardising how Js module operate
ES module each dependency is stored in its files
Top comments (0)