Kotlin Control Structures
Kotlin has the basic control structures you’d expect to find in a programming language, including:
- if/then/else-if/else
for
loops- try/catch/finally
while
anddo..while
loops
It also has unique constructs, including:
when
expressions, which are like improved Javaswitch
statements
I’ll demonstrate those in the following lessons.