JavaScript Date & Time Interview Questions – JavaScript Date & Time Online Quiz

Question 1:  What does the Date() constructor in JavaScript return by default?

Question 2:  Which method is used to get the full year from a Date object?

Question 3:  Which method returns the day of the week (0–6) from a Date object?

Question 4:  What will new Date().getMonth() return in JavaScript?

Question 5:  How do you get the current timestamp in JavaScript?

Question 6:  Which method is used to set the hours of a Date object?

Question 7:  What does getTime() method return?

Question 8:  Which method sets the day of the month in a Date object?

Question 9: 

Question 10:  Which method is used to convert a Date object to a string?

Leave a Reply