공부
[kotlin] collection.forEachIndexed { index, element ->
승가비
2022. 9. 24. 15:26
728x90
collection.forEachIndexed { index, element ->
// ...
}
https://stackoverflow.com/questions/48898102/how-to-get-the-current-index-in-for-each-kotlin
How to get the current index in for each Kotlin
How to get the index in a for each loop? I want to print numbers for every second iteration For example for (value in collection) { if (iteration_no % 2) { //do something } } In ja...
stackoverflow.com
728x90