Settled Promises
Learn about settled promises.
We'll cover the following
Creating settled promises
The Promise
constructor is the best way to create unsettled promises due to the dynamic nature of what the promise executor does. However, if we want a promise to represent a previously computed value, then it doesn’t make sense to create an executor that simply passes a value to the resolve()
or reject()
function. Instead, there are two methods that create settled promises given a specific value. The lifecycle of a settled promise is shown below.
Get hands-on with 1400+ tech skills courses.