Checkout the jumb statements in kotlin
There are three jump expressions in Kotlin.
A break expression is used for terminate the nearest enclosing loop.
Above for loop terminates its loop when ifcondition execute break expression.
Kotlin break example
Kotlin Labeled break Expression
Labeled is the form of identifier followed by the @ sign, for example abc@, test@. To make an expression as label, we just put a label in front of expression.
Kotlin labeled break expression is used to terminate the specific loop. This is done by using break expression with @ sign followed by label name (break@loop).
Kotlin labeled break example