Logic
AND
Boolean AND operator will be true if and only all the operators are true.
Expression:
<boolean> AND <boolean>
Return:
boolean
Example of usage:
true AND 6 > 5
Return value:
trueOR
Boolean OR operator will be true if and only the conjunction of all the operators is true.
Expression:
<boolean> OR <boolean>
Return:
boolean
Example of usage:
false OR ("smaug" == null)
Return value:
falseIF
IF the condition evaluates to true THEN the result equals the first expression; ELSE, the second expression will proceed.
Expression:
IF(expression: boolean, then: any, else: any)
Return:
then: any || else: any
Example of usage:
IF("bilbo" == "baggins", "This is true", "This is false")
Return value:
"This is false"Switch
Returns first expression where the value matches appropriate right operand.
Expression:
SWITCH(value: any[, switchOperand: number, expression: any ], default?: any)
Return:
any
Example of usage:
SWITCH(2, 1, "apples", 2, "pears", 3, "oranges", "no fruits")
Return value:
"pears"Last updated
Was this helpful?
