If the
expr is true, the statement or statements are executed, otherwise the
else statements are executed. The 'else' block is optional.
if (expr) statement if (expr) statement else statement if (expr) { statements } if (expr) { statements } else { statements } For the most part, end of lines are optional.
if (a) doFoo()
if (a)
doFoo()
if (a) { doFoo() }
if (a) {
doFoo()
} else {
doBar()
}
if (a) {
doFoo()
} else
if (b) {
doBar()
}