Result not logged on console

Hi. I’ve passed the challenge but I’m just wondering why is the console.log(result doesn’t work where nothing is printed in the console. Perhaps one might say this is a limitation of FCC so use your own browser console but what’s exactly is the limitation?

  **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/93.0.4577.63 Safari/537.36 Edg/93.0.961.47

Challenge: Handle a Fulfilled Promise with then

Link to the challenge:

Yeah, I don’t know why. It works as expected in a “real” JS environment.

Keep in mind that that console on the FCC screen is not a “real” console but just something FCC built and controls programatically. If you open up the “true” console, the browser console, you’ll see that your message gets there just fine. You can usually open it with something like ctrl-shft-i. That browser console is a very powerful tool that you will eventually need to learn about.

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