What is the purpose of the module .Exports?

Forums Node.jsWhat is the purpose of the module .Exports?
Staff asked 2 years ago

Answers (1)

Add Answer
Rajbir Marked As Accepted
Staff answered 2 years ago

In Node.js a module encapsulate all related codes into a single unit code that can be parsed by moving all relevant functions into a single file. You may export a module with the module and export the function which lets it be imported into another file with the needed keyword.

Subscribe

Select Categories