What I Know About Kotlin Language

Kotlin language is mostly used with Android studio to create native Android apps. I don’t know other use of this language BTW, of course it could be useful in some other fields too.

Var vs Val

There are two ways to define a variable in this language which are var and val

  1. Var -> when we define a variable using var keyword in this language, that variable’s value can be modified. It is similar to let in the JavaScript language
  2. Val -> when we define a variable using val keyword its value cannot be modified later. It is similar to const in the JavaScript language.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *