Error in Javascript Dates Quiz

Question 12:
What is the output of console.log(new Date(2003, 6, 27).getMonth()); ?

The correct answer should be 5.
But we can only choose 6. And the quiz counts that as a ‘correct’ answer.

Hi @lapping

Would you like to raise an issue on the freeCodeCamp GitHub page?

Happy coding

the correct answer should not be 5

if you try running the code you should see that it outputs 6

image

Oh I see. The month in the Date constructor is also zero-based.
The error is actually on my part. I apologize.