A pending promise has neither fulfilled nor rejected. It becomes settled when its state changes to fulfilled or rejected, and that change can happen only once. A promise starts pending; its state cannot be read directly from the promise object. section 8.1.1
The executor controls how a promise leaves the pending state:
- Calling resolve with a normal value fulfills it; resolving with a thenable makes the promise follow that thenable’s outcome. section 8.1.1
- Calling reject or throwing from the executor rejects it. section 8.1.1
- A promise returned by then also starts pending and is resolved according to the callback’s return value or thrown error. section 8.1.2
// Creates a promise that’s permanently pending.
new Promise((resolve) =>
resolve({
then: () => {},
}),
);
This promise resolves to a thenable whose then method does nothing, leaving the promise permanently pending. section 8.1.1



