What do the “is” and “as” Keywords in Kotlin mean?

Besong-Anong Ernest Egbenchong II
Kt. Academy
Published in
3 min readFeb 28, 2024

--

Photo by Jessica Pamp on Unsplash

There are two ways of declaring variables in Kotlin.

  1. With a type:
[val/var][variable_name]: [type] = [value]

2. Without a type:

[val/var][variable_name] = [value]

It is a good practice to specify types when declaring variables in order to assign correct values. However, most…

--

--