3 ms·
In Kotlin, if is an expression: https://kotlinlang.org/docs/reference/control-flow.html https://kotlinlang.org/docs/reference/control-flow.html. This is why the
by Plaastix 7y ago
In Kotlin, if is an expression: https://kotlinlang.org/docs/reference/control-flow.html https://kotlinlang.org/docs/reference/control-flow.html. This is why the language drops Java's ternary operator.