An if statement defines a condition and one or two statements that are executed depending on the Boolean value of the condition. The first statement is executed if the specified condition is true; if the condition is false or invalid, the second (optional) statement is executed. The statements can be any WMLScript statements, including other nested if statements.
The following is an example of an if statement:
if (sunShines) {
myDay = "Good"
goodDays++;
} else
myDay = "Oh well...";