kotlin varargs code example
Example 1: kotlin var val
+----------------+-----------------------------+---------------------------+
| | val | var |
+----------------+-----------------------------+---------------------------+
| Reference type | Immutable (once initialized | Mutable (can change value)|
| | can't be reassigned) | |
+----------------+-----------------------------+---------------------------+
| Example | val n = 20 | var n = 20 |
| | n++ | |
+----------------+-----------------------------+---------------------------+
Example 2: kotlin var and val
val declares a read-only property, var a mutable one