`

Promises

Promises are objects created using Promise() constructor function.
The Promise() constructor function accepts an executor function as an argument. The executor function runs some logic and create/produces a “returnValue”, this function futher accepts 2 arguments as functions being resolve() and reject(). The returnValue is then passed to the promise object through the then and catch function provided by Promise() constructor function

The promise object is initially created in the pending state and have the following 2 propertes:

Inbuilt Promises

Custom Promises

References