What happens if we call require() method to load same module multiple times in Node.js?



What happens if we call require() method to load same module multiple times in Node.js?..

Answer / Udai Veer Singh

If you call 'require' to load the same module multiple times in Node.js, the module will only be loaded once. Subsequent calls will return the same object instance.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Node.js Interview Questions

What are the biggest drawbacks of node.js?

1 Answers  


What is req res?

1 Answers  


How does node js handle child threads?

1 Answers  


What do you mean by “streams”?

1 Answers  


What is difference between synchronous and asynchronous method of fs module?

1 Answers  


Explain node.js architecture?

1 Answers  


What is Streams in Node.js?

1 Answers  


Why to use MEAN stack?

1 Answers  


How do you extract post data in node.js?

1 Answers  


What are the fundamental difference between node.js and ajax?

1 Answers  


What is node.js and why it is used?

1 Answers  


What does an http server do?

1 Answers  


Categories