Number of states in Promises

Tell us what’s happening:
Describe your issue in detail here.
It’s not related to code but In this challenge, They have mentioned that A promise has 3 states. Correct me if I’m wrong but I have read during one of the interviews preparation that settled is a state of promise.

  **Your code so far**
const makeServerRequest = new Promise((resolve, reject) => {
// responseFromServer represents a response from a server
let responseFromServer;
if(responseFromServer) {
  // Change this line
  resolve("We got the data");
} else {  
  // Change this line
  reject("Data not received");
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.115 Safari/537.36

Challenge: Complete a Promise with resolve and reject

Link to the challenge:

A settled promise means that it is either in the fulfilled or rejected state. In other words, it’s not pending any more, we know the outcome. I suppose you could refer to settled as a state, but it’s only telling you that the promise has resolved, it doesn’t tell you the ultimate state of the promise.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.