In Kotlin, we can define a read-only variable using the val keyword, and we can use the var keyword for mutable variables. In Kotlin, a variable can be defined as a first class citizen, meaning that we don't have to create a class of a function to hold variables. Instead, we can declare them directly in a file.
The following example shows how to define read-only and mutable variables:
val readOnly = 3
var mutable = 3