ES6 Promise not accepting

Tell us what’s happening:
my code matches solution but the test is not getting passed.

Your code so far
const makeServerRequest = new Promise ((resolve,reject) =>{

});


const makeServerRequest = new Promise ((resolve,reject) =>{
resolve(12);
});
makeServerRequest.then ((val) => console.log("resolve the: ",val));

Your browser information:

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

Challenge: Create a JavaScript Promise

Link to the challenge:

Hello @pinjari.aaftab, welcome to the forum.

I don’t think that you actually need to consume the Promise yet, so the then statement may be unnecessary .

As per the challenge, I fear that the extra space here:

new Promise ((resolve,reject) => {});

may be a problem, for sure it looks weird.
Have you tried conform to a more standard syntax?

new Promise(() => {})
1 Like

yes the space was the problem .Thank you for replying.