forEachIndexed

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") }
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.35.122