In the previous article, we reviewed our understanding of the Nodejs event loop. We understood how Nodejs uses multiple callback queues for different functions and pushes them back on the call stack in a particular priority. In the bonus section, I introduced the microtask queue which is responsible for handling functions deferred using the Promise API. Microtask queue has the highest priority over any other queue, also, it is divided into further two queues: One for the functions deferred using process.nextTick() and other for Promises.

In this article, we will understand what a promise is, what is it doing in…


Credits: Marcio Silva, Getty images/Stockphoto

In this article we will review the asynchronous nature of Nodejs relying on event loop. Simple yet powerful asynchronicity is one of the key features of Node.js which allows us to build highly scalable applications.

Primer

What is Node.js? It is a Javascript runtime environment. Originally Javascript was meant to be run in browser environment, and the was the case before Node.js came along. When Javascript started gaining popularity, development teams behind major browsers worked hard to offer better support for Javascript and find ways to run it faster. This led to the development of V8 engine from The Chromium project…

Ishan Shukla

Full stack developer with inclination towards UX

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store