Simple game in JavaScript. As via Codecademy.com