Home > Articles

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?

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.