Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyKotlinnull safety and double bangSingle-choice MCQ

Why does the compiler accept name.length here without any ?. or !!?

fun show(name: String?) { val name = name ?: return println(name.length) }