Question
· Jun 5, 2018

Ternary Operators

Hello community, simple question. I've been able to use a ternary operator equivalent by using $select for inline if statements using this pattern:

set x = 1

set result = $select(x = 1: "true", x = 0: "false")

These can be nested and can have a lot of options. But I'm curious if there is a native way of using ternary operators in ObjectScript?

Thank you

Discussion (1)0
Log in or sign up to continue