What’s up with that syntax? Why the use of var here?
Kotlin knows mutable and immutable variables. var indicate mutables and val would indicate immutables (comparable with the final modifier in java and const in JavaScript/TypeScript).
TypeScript vs Java?
char a[69]; btw.
Why have String when we have a perfectly good array at home?
I see your TypeScript and raise you kotlin:
What’s up with that syntax? Why the use of var here?
Kotlin knows mutable and immutable variables.
var
indicate mutables andval
would indicate immutables (comparable with thefinal
modifier in java andconst
in JavaScript/TypeScript).