val vs var (Kotlin)

In Kotlin, val declares a read-only (immutable) reference that can't be reassigned, while var declares a mutable one that can. Prefer val by default for…