Sample Solution to JavaScript Lab Exercise 3