I can use continue
in normal for loop.
for (i in 0..10) {
// .. some initial code
if (i == something) continue
// .. some other code
}
But it seems I can't use it in forEach
(0 .. 10).forEach {
// .. some initial code
if (i == something) continue
// .. some other code
}
Is there a way to use have the similar continue
statement for forEach
?