DEV Community

Harit Himanshu
Harit Himanshu

Posted on

1 2

Answer: How can a Promise be resolved and pending?

It's right there in the section you linked to:

A promise is resolved if it is settled or if it has been “locked in” to match the state of another promise. [...]

That other promises might still be pending. Lets take a look at an example:

var p = new





?signin=true

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post