The ternary conditional operator assigns a value to a variable based on the evaluation of a comparison operator or Boolean value.
Here is a prototype:
(boolValue ? valueA : valueB)
Here is an example:
var x = 2 var y = 3 var z = (y >x ? "Y is greater" : "X is greater") //z equals "Y is greater"