What is the difference between module.exports and exports in node.js?
Answer / Vandana Sharma
In Node.js, `module.exports` and `exports` refer to the same object. However, it's common to use the shortcut `exports`. When you assign a value to `module.exports`, you are effectively changing the object that `exports` refers to.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is middleware in node.js?
What is promisify?
How Grunt and Gulp deal with Task Automation?
Explain the concept of stub in node.js.
How to run multiple node js files?
Why is yarn better than npm?
How node.js and javascript are related?
How to create a module in node js?
How to create a class in node js?
What’s the difference between ‘front-end’ and ‘back-end’ development?
What are the various options to download the version of a node module?
Since node is a single threaded process, how to make use of all cpus?