October 2018
Intermediate to advanced
370 pages
9h 15m
English
The forEachIndex function evaluates each element of the list and provides the element's index:
println("Print elements with index")numbers.forEachIndexed { index, element -> println("Element $element at index $index") }
Read now
Unlock full access