Update hw2.js

fixed small bug that ran both functions if no they didn't supply information for the answer part of the game.