First attempt at if/else in JavaScript