val or var?

Report a typo

Here is a variable called number. Change its value to 5.

Note that there are at least two ways to do it.

Write a program in Kotlin
fun main() {
// Do not touch the line above
val number = 2
number = 5
// Do not touch the lines below
print(number)
}
___

Create a free account to access the full topic