Source: thenewstack.io

Promises in JavaScript: A Primer
The following article covers a brief introduction to the concept of Promises. Promises are new-ish to JavaScript (introduced in https://thenewstack.io/fat-arrow-points-way-easy-es6-goodies-busy-js-devs/), and often misunderstood.

The last topic will be the order of execution when promises are executed in multiple lines of code and what a successful promise resolution versus what a failed promise looks like from an external API.

Failed/rejected: The result of the promise if an error took place during the fulfillment of the promise.

This was an incredibly brief and basic introduction to promises.

Related Articles