"?:" redirects here. For use as a binary operator, see Elvis operator. In computer programming, the ternary conditional operator is a ternary operator that is part of the syntax for basic conditional expressions in several programming languages. It is commonly referred to as the conditional operator, conditional expression, ternary if, or inline if (abbreviated iif). An expression if a then b else