You have the following data class:
data class Student(val name: String, val age: Int, val isStudent: Boolean)
Choose all the correct cases of destructuring declarations:
1) fun iterateThroughStudentsList(studentData: MutableList<Student>) {
for ((name, _, isStudent) in studentData) {
// some code
}
}
2) fun iterateThroughStudentsList(studentData: MutableList<Student>) {
for ((, age, isStudent) in studentData) {
// some code
}
}
3) fun iterateThroughStudentsList(studentData: MutableList<Student>) {
for ((name, age, ) in studentData) {
// some code
}
}
4) fun iterateThroughStudentsList(studentData: MutableList<Student>) {
for ((_, _, _) in studentData) {
// some code
}
}