InterviewSolution
Saved Bookmarks
| 1. |
What is the purpose of module.exports in Node.js? |
|
Answer» In Node.JS, MODULE.exports is a special OBJECT that is included in every JavaScript file present in the Node.JS file default. Here module is a variable that represents the current module, and export is the object that will be exposed as the module. Here we export a string from testYourModule.js file EXAMPLE// testYourModule.js |
|