ES6 - Handle a Fulfilled Promise with then

Tell us what’s happening:
For some reason, the Run Tests button is not working. This also happens in other lessons, even when I am certain that the code is correct. I tried using a different browser, but the same thing happens.

Your code so far

const makeServerRequest = new Promise((resolve, reject) => {
  // responseFromServer is set to true to represent a successful response from a server
  let responseFromServer = true;
    
  if(responseFromServer) {
    resolve("We got the data");
  } else {  
    reject("Data not received");
  }
});

makeServerRequest.then(result => {
  console.log(result);
});

Your browser information:

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

Challenge: ES6 - Handle a Fulfilled Promise with then

Link to the challenge:

This code is working for me.

Can you be more specific about what “the Run Tests button is not working”? What is happening exactly?

1 Like

Hi

Try saving the page and reload it will work, it is also happening with me

1 Like

When I click the button, nothing happens - not even the notification that the tests are incorrect. @AbhishekKuradia has given a solution for it, although doing this for all challenges is quite inconvenient.

1 Like

A fix has been deployed and should be showing up soon.

There is an issue at the moment with the console not updating, but there is an easy workaround:

  1. Copy your code
  2. Refresh the page (CTRL+F5)
  3. Paste your code

This will refresh the console too. You may need to do this each time the console gets stuck, until you have correct code to pass the challenge.

This issue will hopefully be resolved soon!