Kotlin's if-else expressions are also statements code example
Example 1: kotlin if else
fun bigger(a: Int, b: Int) = if (a > b) a else b
Example 2: kotlin if
if (a > b) {
max = a
} else {
max = b
}
fun bigger(a: Int, b: Int) = if (a > b) a else b
if (a > b) {
max = a
} else {
max = b
}