Check out example codes for "kotlin labels". It will help you in understanding the concepts better.

Code Example 1

fun onlyPrimes() {
    // You can use labels to specify which loop will skip current iteration

    [email protected] (num in 2..100) {
        for (check in 2..(num / 2)) {
            if (num % check == 0) {
                [email protected]
            }
        }
        println(num)
    }
}

Learn ReactJs, React Native from akashmittal.com