$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · medium · #98

What is the output?

console.log(new Date(2026, 0, 15).getMonth());
  1. 0
  2. 1
  3. 15
  4. 12
Date months are zero-based, so January is 0.
Play Problem Solving ▸