Ternary operator in Kotlin?
In Kotlin, the if statement can be used like an expression. See below:
val twoEqualThree = if (2 == 3) 5 else 6
Bite sized Kotlin tutorials
In Kotlin, the if statement can be used like an expression. See below:
val twoEqualThree = if (2 == 3) 5 else 6
Comments
Post a Comment