HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Conditional statement used to perform different actions depending on the situation.
In VBScript, we can use four conditional statements:
In the following cases, you can use the If /en. Then /en. Else statement:
If onlyone statement when the condition is true, you can write the code for the line:
In the above code, there is no /enElse /en statement. We just let the code if the condition is true (when i = 10 time) to performan operation.
If you executemore than one statement when the condition is true, then we must write a statement in a row, then use the keyword "End If" to end this statement:
In the above code, the same does not /enElse /en statement. We just let the code to perform anumber of actionsif the condition is true.
If you want conditional execution of a statement is true and execute another statement when the condition is not true, you must add the keyword "Else":
In the above code, when the condition is true it will execute the first code, the second paragraph of the code executed when the condition is not satisfied (when i is greater than 10).
If you want to select one of many sets of lines to execute, you can use the If /en. Then /en. ElseIf statement:
If you want to select one of many sets of lines to execute, you can use the "Select Case" statement:
The above code works: First, we need a simple expression (usually a variable), and this expression is evaluated once operations. Then, as the value of the expression will be the value of each Case comparison. If they match, matched Case corresponding code will be executed.