How to resolve this 'Unresolved reference'?


#1


#2

Hello,

You must declare your function before calling it, move your declaration of nextTwo() above the call.

fun nextTwo(num: Int) : Pair<Int, Int>{
    return Pair(num+1, num+10)
}

val (two, three) = nextTwo(1)
println("1, $two, $three")

#3

thanks.