ES6 - Complete a Promise with resolve and reject

Tell us what’s happening:
Describe your issue in detail here.

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

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0

Challenge: ES6 - Complete a Promise with resolve and reject

Link to the challenge:

I was thought the checker from website was wrong or something but this may not exactly what i was thinking

The reject text box has something wrong with it

what’s this variable? its value is always undefined

use the reject method instead and pass it the string: Data not received .

You are not using the correct string value.

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