Home > Articles

  • Print
  • + Share This
This chapter is from the book

Exercises

In Lesson 5, “Using DOM Objects and Built-in Objects,” you learned how to get the current day of the week. Write a program using a switch statement to output a different message to the user, depending on what day it is today.

Modify Listing 10.2 to list the months of the year rather than the days of the week. How can you modify the code to list the months starting with January as Month 1 rather than Month 0?

  • + Share This
  • 🔖 Save To Your Account