If

The if-statement has the following syntax:

if(<expression>) {
  <block executed if true>
} [else {
  <block executed if false>
}]

If the expression is true the first block of code is executed, if it’s
false, the second block is executed. The else block is
optional. Example:

if(user.lastName = "Doe") {
  msg := "You are unkown";
}

If can also be used in an expression, using the following syntax:

if(e1) e2 else e3

Example:

if(p.visible) p.name else ""