フリー問題

Salesforce Certified JavaScript Developer のフリー問題 3 / 20 問目

問題文

A developer needs to build a Date for the third of March in a given year and then read the month back for a label. Which two statements about the Date constructor and its accessors are correct? (Select two.)

選択肢

  1. The month argument of the constructor is zero based, so March is passed as 2.
  2. Passing a month value of 12 throws a RangeError, so the constructor protects against off by one mistakes.
  3. getMonth also returns a zero based number, so a human readable label needs getMonth() + 1.
  4. The day of month argument is zero based as well, so the third of the month is passed as 2 for consistency with the month argument.
  5. getDay returns the day of the month, so it can be used directly in a label that shows which date of the month the record belongs to.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。