Ternary Operator
The operator has three operands: the condition, the value if the conditions evaluates to true, and the value if the condition evaluates to false.
condition? expression1: expression2
If condition evaluates to true, return expression1, else return expression2.
Last updated
Was this helpful?