Worked through Example 3

from Try It Out Wilton, P., & McPeak, J. (2010). Beginning JavaScript
(4th Edition ed.). p.27. Wiley Publishing, Inc. .