Answers for "kotlin for list reverse order"

2

kotlin reverse list

val reversedList = oldList.reversed()

// Example
fun main() {
 	val list = listOf("A", "B", "C")
    println(list)
    val reversed = list.reversed()
    println(reversed)
}
Posted by: Guest on August-27-2021

Browse Popular Code Answers by Language