Javascript Tutorial example from Lecture 7  (https://docs.google.com/presentation/d/1Bvsgw2g5KQVl1UKouuGJobvVZ_xSF-ejEYrSyxRh324/edit?usp=sharing)