Logical operators
Logical operators associate conditions. They perform logical operations on the Boolean values returned by these conditions.
Operator | Description | Example |
---|---|---|
<condition> and <condition> |
Associates two conditions such that the resulting expression is only true if both conditions are true. |
if the category of 'the customer' is Gold and the age of 'the customer' is at least 60 then... |
<condition> or <condition> |
Associates two conditions such that the resulting expression is true if either (or both) conditions are true. |
if the category of 'the customer' is Gold or the age of 'the customer' is at least 60 then... |