Exercise 2.js

Updated the exercise 2.js file