Where should we use var and where val in Kotlin?
var
val
Use var for class properties and val for local variables.
var and val can be used interchangeably; there is no difference.
Use var for mutable variables and val for immutable variables.
Use var for integers and val for strings.