JavaScript Consuming Promises

Advice

Use [JavaScript Async Functions](JavaScript Async Functions) instead of this.

Syntax

promise
.then(value => { /* fulfillment */ })
.catch(error => { /* rejection */ });