Creates a ternary operator
Aliases:
condition ? trueValue : falseValue
-- Haskell does not have a ternary operator.-- Use a case expression or an if-then-else expression instead: let result = case condition of True -> trueValue False -> falseValue
trueValue if condition else falseValue
ifelse(condition, trueValue, falseValue)
condition ? true_value : false_value
// Scala does not have a ternary operator.// Use an if-else expression instead: val result = if (condition) trueValue else falseValue
# Bash doesn't have a ternary operator, but you can use an if statement:condition && trueValue || falseValue