fun main() { val score = 85 val grade = when { score >= 90 -> "A" score >= 80 -> "B" else -> "C" } println(grade) }
each branch is a boolean test