This question comes from the class CS 11200 at Purdue Fort Wayne.
Assignment 4 Question 3 letter c
For letter c I created the javascript