Question from the Kotlin test

How to flatten a list of lists in Kotlin

Hard
val nombres = listOf(1, 2, 3) // [1, 2, 3]
val result = nombres.flatMap { listOf(it, it, it) }
println(result)

What value of result is displayed in the console?

Author: W3D TeamStatus: PublishedQuestion passed 674 times
Edit
6
Community EvaluationsNo one has reviewed this question yet, be the first!