kotlin loop with index code example Example: for loop in kotlin with index Click to copycollection.forEachIndexed { index, element -> // ... }