Interpreter mistake or my knowledge gap?

Tell us what’s happening:
I think I got error in error checking machine here, I make use of makeServerRequest before its declaration still it accept the solution.
If I’m missing something, please correct me.

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”);
makeServerRequest.then(result => console.log(result));
} else {
reject(“Data not received”);
}
});


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");
  makeServerRequest.then(result => console.log(result));
} else {  
  reject("Data not received");
}
});

Your browser information:

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

Challenge: Handle a Fulfilled Promise with then

Link to the challenge:

I think the instructions for this challenge might not be quite as clear as they could be. Use the “Reset All Code” button to put this challenge back to its original state. You do not want to make any changes to what is already there. What you see there is a promise being created and stored in the makeServerRequest variable. What this challenge wants you to do is to use this variable to handle the promise. You know the promise is going to resolve successfully because it is hardcoded as such, so you only need to use the then method on it. So add a new statement below the current code using the makeServerRequest variable and the then method that does what the instructions ask for.