How to Declare and Use Variables in Kotlin

There are two types of variables in Kotlin: read-only and mutable. Read-only variables (or constants) are declared with val and mutable with var. Every variable must be declared. Any attempt to use a variable that hasn’t been declared yet is a syntax error; thus, you are protected from accidentally assigning to a misspelled variable. The… Continue reading How to Declare and Use Variables in Kotlin