Evaluates an expression, and does the first statement if the expression is true, or the second statement if the expression is false.
Syntax
expression ? doThisIfTrue : doThisIfFalse
Example
document.write ("Your shipping charge is " + (isExpress ? "$12.00" : "$5.00")) //Prints "$12.00" if isExpress is true, "$5.00" if it is false.
Remarks
Shortcut for the "if" statement.