JavaScript · Junior · Question 33 of 75
Which states can a promise be in?
- ✓Correct answer:
pending, thenfulfilledorrejected- and it never changes again - 2
pending,running,doneandcancelledon user request - 3Only
resolvedorrejected; there's no initial state
Explanation
A promise starts pending and settles exactly once into fulfilled or rejected. Further resolve/reject calls are ignored. A promise can't be cancelled - use AbortController to cancel operations.