The if statements executes the block of code only when the condition is true. If the condition, evaluates it to be false, then the code is not executed.
Example for if statement
void main(){
var i=2;
if(i%2==0){
print("The number is divisible by 2);
}
}
The output of the code is:-
The number is divisible by 2