Kotlin - Operators and Expressions
Given the following Kotlin code, what will be the output?
fun getName(user: Map): String { return user["firstName"] ?: user["nickname"] ?: user["lastName"] ?: "Anonymous" } val user1 = mapOf("firstName" to null, "nickname" to null, "lastName" to "Smith") println(getName(user1))
