
|
Else is used after an if statement. If the condition is false, its opposite will be true and else will run its statement or code block.
Examples:
if (var1 == var2) var1 = 1; else // Perform different action
if (var1 == var2) var1 = 1;
else
{
var1 = 2;
}