created if/else statements in JavaScript