Kavin
08/12/2019, 11:43 AMforEachIndexed
loop in Kotlin? While iterating the array, I want to break it based on a specific condition is met. I have tried break
but getting compile time error break and continue are only allowed inside a loop. Using return
just skips that specific index but continues the loop. Does it mean we cannot break
forEach
or forEachIndexed
?