adding scratch pad work to homework2.js file
merged solutions copy to question 1