freeCodeCamp rejects an apparently correct answer

Tell us what’s happening:

So I tried to run the test with this code and keep getting the following error message: “Your promise should receive a function with resolve and reject as parameters.” I have no idea how my function is NOT receiving those two as parameters (it’s actually identical to the code posted in hint). So I also tried to adjust the space between the brackets, arrows, and commas to see if this is some technical glitch, but with no success. Can anyone help point out my mistake if any? Thanks

Your code so far


const makeServerRequest = new Promise ( (resolve, reject) => {

    
} );

Your browser information:

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

Challenge: Create a JavaScript Promise

Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/es6/create-a-javascript-promise

It appears to be a possible bug? I just re-typed, copy pasted, and typed it all in again and it worked like half of the time. I got the challenge to pass though so I would suggest clearing your browsers cache and cookies if you still can’t.

The first time I got it to work I copied the example and just changed the variable name to be sure there were no typos. Try that.

1 Like

The test doesn’t like the space between “Promise” and “(”.

2 Likes

Hey sorry for the late reply! Yep copying and pasting worked for me. Thank you.

I’ve actually tried removing the space between them before I posted here but it didn’t work. Guess the solution to the glitch also varies a little for everyone. Appreciate your reply anyways!