Kotlin: destructuring declarations
Example:
data class User(val name: String, val age: Int)
Destructuring allows you to break an object into multiple variables.
Solution:
val john = User("John", 25)
val (name, age) = john
Example: Solution:Kotlin: destructuring declarations
Destructuring allows you to break an object into multiple variables.
data class User(val name: String, val age: Int)
val john = User("John", 25)
val (name, age) = john