Table of Contents
An if statement is used to execute statements only when a specified condition is true.
ifcondition
thenstatement
ifcondition
/* optional "then" here */statements
end
An if statement may have an else clause, which is executed when the condition is false.
ifcondition
thenstatement
elsestatement
ifcondition
statements
elsestatements
end
The else clause may itself be an if statement, taking this form:
ifcondition
statements
else ifcondition
statements
/* ... */ elsestatements
end