This is a conditional operator that takes three operands and is used to replace simple if statements.
The first operand is a condition that evaluates to true or false, the second is an expression of any type to be returned if the condition is true, and third is an expression of any type to be returned if the condition is false.
with(beer)
document.write("This beer is " +
((percent_proof < 5) ? "mild" : "strong"));
This code displays one of two messages depending on the value of the object property 'percent_proof'.