Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyKotlinlambdas and trailing lambdasSingle-choice MCQ

What does a bare return inside this lambda do?

fun find(list: List<Int>): Int { list.forEach { if (it > 0) return it } return -1 } // find(listOf(-3, 4, 9))