ok, my suggestion is just like with the try-catch ...
# language-proposals
j
ok, my suggestion is just like with the try-catch
Copy code
val k = for (i in 1..10) {
    "blah-$i"
   if (i == 3) break

}
now the value of k should be
blah-3
Same for while loops:
Copy code
val k = while (true) {
   if (value is expected value) {
      "somethinghere"
      break;
   }
}