Completed 2nd part of the second exercise for intro to javascript