Ask about the promise ES6

Tell us what’s happening:

Your code so far


const makeServerRequest = new Promise((resolve, reject) => {
// responseFromServer represents a response from a server
let responseFromServer;
  
if(responseFromServer) {
  resolve ("We go the data");// Change this line
} else {  
  reject ("Data not received");// Change this line
}
});

Your browser information:

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

Challenge: Complete a Promise with resolve and reject

Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/es6/complete-a-promise-with-resolve-and-reject

Welcome, Ahmad.

You have not asked a question, or Told us what’s happening.

We cannot help you, if you do not provide details.

Ahmad your code is correct, the reason it is not passing is because you did not copy and paste the exact text of the challenge. change “We go the data” to We got the data" and your code passes.