else
Basic Usage:
var x = 10
# Using 'if' with 'else'
if x > 10 then
show("x is greater than 10.")
else
show("x is not greater than 10.")
endExplanation:
Elif Clause:
var x = 10
# Using 'if' with 'elif' and 'else'
if x > 10 then
show("x is greater than 10.")
elif x == 10 then
show("x is equal to 10.")
else
show("x is less than 10.")
endExplanation:
Multiple Elif Clauses:
Explanation:
Nesting Else Statements:
Explanation:
Last updated