The ternary conditional operator takes a condition and returns one of two values, depending on whether the condition was true or false.
val a = 5 val b = 10 val min = if (a < b) a else b
let a = 5 let b = 10 let min = a < b ? a : b
a = 5 b = 10 min = a if a < b else b