I've probably at least touched on this once before, but I'll do it again anyhow.
ColdFusion and Lucee (and before than Railo) have both got an operator
?:this is the binary equivalent of the ternary operator
result = firstOperand ?: secondOperand; // binary result = firstOperand ? secondOperand : thirdOperand; // ternary
The ternary version predates the binary one, so let's start with that. It works as follows:
result = booleanExpression ? valueToUseIfTrue : valueToUseIfFalse;
result = isInteger(17) ? "it's an integer" : "no it isn't"; // "it's an integer" result = isInteger("nineteen") ? "it's an integer" : "no it isn't"; // "no it isn't"
The key thing is that the first operand needs to evaluate to a boolean. It's a shorthand for if/else.
Now I'm going to dip out of CFMLland for a moment, and back into the real world.