What is the purpose of the module .Exports?

Forums Node.jsWhat is the purpose of the module .Exports?
Staff asked 4 weeks ago

Answers (1)

Add Answer
Rajbir Marked As Accepted
Staff answered 4 weeks 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.


Select Categories