Completed 3rd part of the second exercise for intro to javascript