Aman Kharbanda

Student at Delhi University

Async and Await in Node.js

While writing your node js code you might encounter with problems of callback hell where multiple callbacks/ async function are chained together to do a particular task. The more functions it has more complicated it gets. Async and Awat is a life saver, it allows you to write async code synchronously. It is built on promises and behaves like sync code. Promises are a compelling alternative to callbacks when dealing with asynchronous code. Unfortunately, promises can be confusing and perhaps you’ve written them off. However, significant work has been done to bring out the essential beauty of promises in a way that is interoperable and verifiable. See this in action in this online video tutorial on youtube. https://goo.gl/HxxRRP