conditional operator

noun
UK /kənˈdɪʃənəl ˈɒpəreɪtə/
US /kənˈdɪʃənəl ˈɑːpəreɪtər/

A conditional operator is a special symbol in computer code that picks one of two answers based on whether something is true or false.

The programmer used a conditional operator to show "yes" if the score was high and "no" if it was low.


OTHER MEANINGS

2. In some programming languages, a general term for any operator that tests a condition before choosing a result.

Logical AND and OR are sometimes called conditional operators because they depend on the truth of their operands.

3. A symbol in mathematics or logic that combines statements with "if...then" meaning.

The implication arrow is a conditional operator in formal logic.

4. A shorthand way to write a simple if-else choice in a single line of code.

Instead of a full if-else block, she wrote a conditional operator to keep the code short.