how can I break from a foreach :open_mouth:
# getting-started
o
how can I break from a foreach 😮
e
You cannot, but here is a related issue: https://youtrack.jetbrains.com/issue/KT-1436
o
you can return a label
foreach inner@ return@inner
e
@oday You can just
return@forEach
(there is an implicit label), but it does
continue
, not
break
l
Maybe you can create a method and return the value. I don't like too much but works.