No one would like to work with the code having one gigantic JavaScript file with many unrelated functions. Moreover, when you need to use few of the functions from that file, you end up loading all the others unnecessarily. AMD was a great way of achieving modularization in JavaScript. Node.js already supports the module system using CommonJS.

Javascript(ES6)'s inclusion of modules was a game changer. We are able to take advantage of the modules functionality native way. In this post, I would like to introduce you to the JavaScript module concept and in-depth understanding of using the keywords export and import effectively. All the code snippet used in this post are in my gitHub repo .

#javascript #node-js

JavaScript Modules and how to effectively work with Export Import
1.20 GEEK