JavaScript·Intermediate·Conceptual·1 min read
What states can a Promise have?
Short interview answer
A promise is pending, fulfilled with a value, or rejected with a reason. Fulfilled and rejected are settled states. A promise can be resolved to another promise and still remain pending while it adopts that promise's eventual state.
Key takeaway
Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.