Kotlin - Collections Fundamentals
What does the Kotlin expression map[key] ?: "default" do?
What does the Kotlin expression map[key] ?: "default" do?
[]map[key] returns the value if key exists, or null if it doesn't.?: for fallback?: "default" means if the left side is null, return "default" instead.key if it exists, otherwise returns "default". -> Option B15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions