Table of Contents
An if statement is used to execute statements only when a specified condition is true.
ifconditionthenstatement
ifcondition/* optional "then" here */statementsend
An if statement may have an else clause, which is executed when the condition is false.
ifconditionthenstatementelsestatement
ifconditionstatementselsestatementsend
The else clause may itself be an if statement, taking this form:
ifconditionstatementselse ifconditionstatements/* ... */ elsestatementsend