Skip to content

Commit e87cf18

Browse files
committed
update: when content about if-else-if
1 parent 93f70ee commit e87cf18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/topics/control-flow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ fun hasPrefix(x: Any) = when(x) {
238238
```
239239

240240
You can use `when` as a replacement for an `if`-`else` `if` chain.
241-
If there's no subject, the branch conditions are simply boolean expressions, and a branch is run when its condition is true:
241+
If there's no subject, the branch conditions are simply boolean expressions. The first branch with a `true` condition runs:
242242

243243
```kotlin
244244
when {

0 commit comments

Comments
 (0)