modules in JavaScript

A passionate Full Stack Software Developer 🚀 having an experience of building Web applications with JavaScript and some other cool libraries and frameworks.
A module in JavaScript is just a file containing related code. In JavaScript, we use the import and export keywords to share and receive functionalities respectively across different modules. The export keyword is used to make a variable, function, class or object accessible to other modules. A module is a function or group of similar functions. They are grouped together within a file and contain the code to execute a specific task when called into a larger application.
The export keyword is used to make a variable, function, class or object accessible to other modules. In other words, it becomes a public code.
The import keyword is used to bring in public code from another module.




