With your tools installed, it's time to learn the building blocks of the language. Kotlin's syntax is deliberately concise: you declare values with val (read-only) or var (mutable), the compiler infers most types for you, and string templates let you embed expressions directly in text.
This module covers the basic types and operators, then moves on to control flow. In Kotlin, if and when are expressions that return values, which is why the language has no ternary operator. You'll also use ranges with for, while, and do-while loops to repeat work.
Watch the lessons in order, then continue on to Null Safety & Types.
A beginner tutorial on creating variables, assigning values, and the basic data types you'll use in every Kotlin program.
freeCodeCamp's beginner course with Kotlin's variables, type system, type inference, and basic control flow explained in the context of real code.
A hands-on tour of values, types, expressions, if and when structures, and looping in Kotlin.
Practice with while and do-while loops, the when statement, and ranges, which round out Kotlin's control flow tools.