Beginner
Kotlin
Q15 / 100
What is a lambda expression in Kotlin?
Correct! Well done.
Incorrect.
The correct answer is B) An anonymous function that can be stored in a variable or passed as an argument, written as { params -> body }
B
Correct Answer
An anonymous function that can be stored in a variable or passed as an argument, written as { params -> body }
Explanation
Kotlin lambdas are written as { x: Int -> x * 2 }. If there's a single parameter, you can use the implicit it.
Progress
15/100