Is there any way of writing ifelse statements in expressions? Or even an if statement?
Ifelse statements in expression
Robin
#2
Ternary operator - (Condition ? True : False)
Example:
(([living room light : switch])==on?”the switch is on”:”the switch is off)
Robin
#3
And you can stack a ternary operator inside a ternary operator etc etc.
(count(PersonsPresent)==0 ? ”everyone is away” : (count(PersonsPresent)==1 ? PersonsPresent “ is present” : PersonsPresent “ are present” ))