Multiple choice technology enterprise content management

var expires = new Date(2009,11,10); What value will expires.getMonth() expires.getDate() expires.getHours() return.

  1. 11, 10, 12

  2. 10, 11, 12

  3. 11, 10, 0

  4. compile time error. Wrong Date signature

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In JavaScript, months are 0-indexed (0 is January, 11 is December). Thus, new Date(2009, 11, 10) represents December 10, 2009. getMonth() returns 11, getDate() returns 10, and since no time is specified, getHours() defaults to 0.