Kotlin - Functions
Identify the error in the following Kotlin function call:
fun calculate(x: Int, y: Int = 10) = x + y calculate(y = 5, 3)
fun calculate(x: Int, y: Int = 10) = x + y calculate(y = 5, 3)
y=5 comes before positional 3, which is invalid.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions