// Practice Set · JS Dates · guest

Guest practice: this set is not saved and does not count.

Question 1 of 5 from: JS Dates

What does this log?

const a = new Date(2026, 0, 1);
const b = new Date(2026, 0, 31);
console.log(Math.round((b - a) / (1000 * 60 * 60 * 24)));
Question 2 of 5 from: JS Date Get

What does this log?

const d = new Date(2026, 9, 2);
console.log(d.getMonth(), d.getDate(), d.getDay());
Question 3 of 5 from: JS Date Get

new Date().now() is a valid way to get the current time in milliseconds.

Question 4 of 5 from: JS Date Set

What does this log?

const start = new Date(2026, 9, 2);
const end = new Date(start);
end.setDate(10);
console.log(start.getDate(), end.getDate());
Question 5 of 5 from: JS Date Set

What does this log?

console.log(new Date(2028, 2, 0).getDate());
Ready to submit?

Click a question to go back and check it. After you submit, you will see the right answer and an explanation for every question. As a guest, nothing is saved.