Finished Homework - hw2

NOTE: included "use strict" option at the top of the hw2.js code.