Ternary Operators Flashcards
1
Q
Ternary operator
A
it is an operator with three operands which is used for evaluating a conditional expression and executing an operation based on the result of the condition
2
Q
Tokens that can be returned by ternary operator
A
▪ Literal (Numeric, Character, Boolean or String)
▪ Variable (Numeric, Character, Boolean or String)
▪ Arithmetic Expression
▪ Boolean or Logical Expression