Lab: Date, Conditional
-
Use the Date object to create today's date.
-
Use methods discussed in class to find the hour.
-
Use conditional statements, either if/else or switch, to do the following:
-
If the hour is between 5 and 11, print "Good morning!" on the page.
-
If the hour is between 12 and 17, print "Good afternoon!"
-
If the hour is between 18 and 23, print "Good evening!"
-
If the hour is between 0 and 4, print, "Stop programming and get to bed!"
The Document Object Model
Home
Internet II: Day 3