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.
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.
the correct answer should not be 5
if you try running the code you should see that it outputs 6
Oh I see. The month in the Date constructor is also zero-based.
The error is actually on my part. I apologize.