공부
[Kotlin] destructure array
승가비
2022. 6. 6. 02:47
728x90
fun main() {
val destructureArray = arrayOf("1", "2", "3", "4", "5", "6")
val (str1, str2, str3, str4, str5) = destructureArray
println(str1)
println(str2)
println(str3)
println(str4)
println(str5)
}
https://tedblob.com/kotlin-array-destructuring/
Kotlin array destructuring - TedBlob
We will learn about the Array destructuring in Kotlin along with relevant examples. A destructuring declarations provide a convenient way
tedblob.com
728x90