Introduction

A Promise1 is an asynchronous action that may complete at some point and produce a value. It is able to notify anyone who is interested when its value is available.

let fifteen = Promise.resolve(15);
fifteen.then(value => console.log(`Got ${value}`))

Parallel

Errors

Producing & Consuming

Use Async functions instead of this.

Footnotes

Footnotes

  1. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise