Pustaka Taratsa
KOTLIN: When Expression

KOTLIN: When Expression

Penulis: Onno Widodo Purbo

Sumber: https://www.tutorialspoint.com/kotlin/kotlin_when_expression.htm Consider a situation when you have large number of conditions to check. Though you can use if..else if expression to handle the situation, but Kotlin provides when expression to handle the situation in nicer way. Using when expression is far easy and more clean in comparison to writing many if...else if expressions. Kotlin