Conditional statements are used to perform different actions based on different conditions.
Use the switch statement to select one of many blocks of code to be executed.
The list below shows how the switch works:
|
|
|
|
Date
includes the following methods
getDay( )
, which gets the day of the week as a value from 0 to 6,
getDate( )
, which gets the day of the month as a value between 1 and 31, and
getMonth( )
, which returns the month from the date object as a value from 0 through 11.
We live in a society where pizza gets to your house before the police. |