In computer programming, ?: is a ternary operator that is part of the syntax for a basic conditional expression in several programming languages. It is commonly referred to as the conditional operator, inline if (iif), or ternary if.
It originally comes from CPL, in which equivalent syntax for e1 ? e2 : e3 was e1 → e2, e3.
Although many ternary operators are possible, the conditional operator is so common, and other ternary operators so rare, that the conditional operator is commonly (albeit incorrectly) referred to as the ternary operator.
Conditional assignment
?: is used as foll...