Resistor Color Instructions

Promises

The Promise object represents the eventual completion (or failure) of an asynchronous operation, and its resulting value.

The methods promise.then(), promise.catch(), and promise.finally() are used to associate further action with a promise that becomes settled.

Promises are chainable, for example by using .then.

Promises will forward any value. That means that if a promise resolves, it will forward that value until it reaches the end of the chain or a .then, which receives the value as its argument.

Promises will forward any error. That means that if a promise rejects, it will forward that rejection until it reaches the end of the chain or a .catch, which receives the value as its argument and can handle it.

of 1

Promises

The Promise object represents the eventual completion (or failure) of an asynchronous operation, and its resulting value.

The methods promise.then(), promise.catch(), and promise.finally() are used to associate further action with a promise that becomes settled.

Promises are chainable, for example by using .then.

Promises will forward any value. That means that if a promise resolves, it will forward that value until it reaches the end of the chain or a .then, which receives the value as its argument.

Promises will forward any error. That means that if a promise rejects, it will forward that rejection until it reaches the end of the chain or a .catch, which receives the value as its argument and can handle it.