Question from the Kotlin test

Print the value of a nullable string in Kotlin

Medium
var chaine : String? = null
chaine?.let { println("string is $chaine") } ?: run { println("string was null. Setting the value to:")
    chaine = "Kotlin"}
println(chaine)

What does the console show?

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