Question from the Kotlin test

Add a secondary constructor to a Kotlin class

Hard
class Person(val name: String) {
    var children: MutableList<Person> = mutableListOf<Person>()
}

I want to add a secondary constructor taking in addition to the name, a parent as a parameter, for this I must write:

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