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
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.