This article will explain module.exports and exports and their different use cases.

Firstly ‘module.exports’ is a object which is returned whenever you require() any module and ‘exports’ is a variable referring ‘module.exports’ think of it as

Initially ‘module.exports’ is an empty object, and it allow us…

Shubham Mishra

A passionate programmer and a web application developer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store