Which of the following is NOT a state of a Promise?
- Pending
- Resolved
- Rejected
- Completed
In JavaScript, a Promise can be in one of three states: Pending (initial state), Resolved (fulfilled with a value), or Rejected (fulfilled with an error). "Completed" is not a valid state for a Promise; it's either resolved or rejected.
Loading...
Related Quiz
- While working on a project, you found out that the API you are fetching data from sends relevant error messages in the body of the response, even when the request fails. How do you extract and use this error message in JavaScript?
- Which of the following is a way to create a singleton object in JavaScript?
- How does event looping handle while(true) in Node.js environments?
- How is block scope affected when using var compared to let and const?
- How can one implement a switch statement to handle multiple data types efficiently?