Conditional Flow
Conditions
operator
description
If-Statements
<if_statement> ::= "if" <condition> "{" <trueBody> "}" ("else" "{" <falseBody> "}")?func main() {
let isHappy = true;
if isHappy {
print("You are happy.");
}
else {
print("You are not happy");
}
}Last updated