The if statement

An if statement is an action of the form:
if (expression) statement1 else
statement2
Typically, the expression in the if statement has a true-or-false value. If the value is true, statement1 is performed; otherwise, statement2 is performed. The else statement2 part is optional.