Question - What is the difference between the variable declaration with var and val?
Answer -
If you want to declare some mutable(changeable) variable, then you can use var. For the immutable variable, use val i.e. val variables can't be changed once assigned.