In JavaScript (ES6 and above), a Promise is an object representing the state and result of asynchronous operations such as an API call. A Promise has two methods: then and catch . The then method accepts a callback of an action to be initiated after a promise is fulfilled, meanwhile, the catch runs whenever the promise is rejected. Promise chaining in JavaScript is one way to solve the callback hell issue.

4m read timeFrom hackernoon.com
Post cover image
Table of contents
What is a JavaScript Promise ?What is callback hell?What is promise chaining in JavaScript?How does promise chaining work in JavaScript?Wrap up