If...Then...Else - statement of language VBScript

Conditionally executes a group of statements, depending on the value of an expression.
If condition Then statements [Else elsestatements]
or, you can use the block form syntax:
If condition Then
[ElseIf condition-n Then
End If
condition A numeric or string expression that evaluates to true or false. If condition is Null, condition is treated as false.
statements One or more statements separated by colons; executed if condition is true.
condition-n Same as condition
elseifstatements One or more statements executed if the associated condition-n is true.
elsestatements One or more statements executed if no previous condition or condition-n expression is true
You can use the single-line form (first syntax) for short, simple tests. However, the block form (second syntax) provides more structure and flexibility than the single-line form and is usually easier to read, maintain, and debug.

Tip: The single-row form allows to enter multiple statements, but each of the statements must be separated by "colon" character:

If A > 10 Then A = A + 1 : B = B + A : C = C + B
When executing a block If (second syntax), condition is tested. If condition is true, the statements following Then are executed. If condition is false, each ElseIf (if any) is evaluated in turn. When a true condition is found, the statements following the associated Then are executed. If none of the ElseIf statements are true (or there are no ElseIf clauses), the statements following Else are executed. After executing the statements following Then or Else, execution continues with the statement following End If.

The Else and ElseIf clauses are both optional. You can have as many ElseIf statements as you want in a block If, but none can appear after the Else clause. Block If statements can be nested; that is, contained within one another.

What follows the Then keyword is examined to determine whether or not a statement is a block If. If anything other than a comment appears after Then on the same line, the statement is treated as a single-line If statement.

A block If statement must be the first statement on a line. The block If must end with an End If statement.

For similar purpose in the JavaScript language is used the statement if...else.
Dim Temperature
If Temperature>95 Then
ElseIf Temperature<12 Then
End If
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice