Design a site like this with
Get started

Conditional or ternary Operator in Different Languages

? is the conditional operator or the ternary operator. This operator consists of three operands and is used to evaluate Boolean expressions. The goal of the operator is to decide; which value should be assigned to the variable. SyntaxExampleExplanationC/Java/Javascript/C# conditionalExpression ? expression1 : expression2 days= (February == '1') ? 29 : 28; If February is... Continue Reading →

Blog at

Up ↑