What is an event loop in Node.js?

Answer

When running an application, callbacks are entities that have to be handled. In the case of Node.js, event loops are used for this purpose. Since Node.js supports the non-blocking send, this is a very important feature to have.

The working of an event loop begins with the occurrence of a callback wherever an event begins. This is usually run by a specific listener. Node.js will keep executing the code after the functions have been called, without expecting the output prior to the beginning.

Once, all of the code is executed, outputs are obtained and the callback function is executed. This works in the form of a continuous loop, hence the name event loop.

All npm Questions

Ask your interview questions on npm

Write Your comment or Questions if you want the answers on npm from npm Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---