Second game in a series of JavaScript exercises