Skip to content

Conditions

Frederic Jarjour edited this page May 24, 2022 · 4 revisions

Basic Condition check with if/else if/else

if myCondition
    print("Condition is true)
else if mySecondCondition
    print("Second condition is true)
else
    print("Both are false")
end if

Boolean Operators

Kode supports boolean checks between conditions with the keywords and, or and not.

if myCondition and mySecondCondition
    print("Both conditions are true")
else if not myCondition
    print("condition1 is false")
else if myCondition or mySecondCondition
    print("At least one condition is true")
else
    print("This is getting confusing, but you get the point")
end if
Clone this wiki locally