Variables and Types¶
JavaScript ES6 and TypeScript do (let
and const
.)
As we’ll see later, Kotlin lets you skip the syntax by inferring type information, but it is still at compile time.
Kotlin will let you know to use a val when you use a var unnecessarily
- Inferred types versus explicit
- The compiler will fail on re-assignment of val
- Scope: top-level versus local
Class variables: properties and fields covered in classes
- Types on variables
- Basic types https://kotlinlang.org/docs/reference/basic-types.html#basic-types