A shortcut for writing an <b>if</b> and <b>else</b> structure. The conditional operator, <b>?:</b> is sometimes called the ternary operator, an operator that takes three arguments. If the <b>test</b> evaluates to <b>true</b>, <b>expression1</b> is evaluated and returned. If the <b>condition</b> evaluates to <b>false</b>, <b>expression2</b> is evaluated and returned.
<br /><br />
The following conditional expression: <br />
<pre>result = test ? expression1 : expression2</pre><br />