Using a ternary to save a result to a variable.