Design a site like this with WordPress.com
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 WordPress.com.

Up ↑