Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Break at label is a convenient way to jump out of a nested loop.

loop@ for (i in 1..5) {
    for (j in 1..5) {
        if (j > 1) break@loop
        println("i: ${i}, j: ${j}")
    }
}
i: 1, j: 1
null