Hi All,
I am going through the kotlin tutorial(link below)
One of the example as part of “when” expression is
val x = 5
val y = 10
when {
x.isOdd() → print(“x is odd”)
y.isEven() → print(“y is even”)
else → print(“x+y is odd”)
}
However when i try to execute this code, i get an error
unresolved reference: isOdd
unresolved reference: isEven
i have searched kotlin website and forums but could not find any results.
Please advice me to resolve this issue.
Thank you for your time and attention.