Module 02 of 12

Language Fundamentals

Lessons

About This Module

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.

Lessons

4 videos
01

Variables and Data Types: Kotlin Tutorial [Part 2]

A beginner tutorial on creating variables, assigning values, and the basic data types you'll use in every Kotlin program.

02

Kotlin Course - Tutorial for Beginners

freeCodeCamp's beginner course with Kotlin's variables, type system, type inference, and basic control flow explained in the context of real code.

03

Kotlin at Light Speed, Part 2: Syntax, Expressions, Control Flow

A hands-on tour of values, types, expressions, if and when structures, and looping in Kotlin.

04

while & do-while Loops, when Statement & Ranges in Kotlin

Practice with while and do-while loops, the when statement, and ranges, which round out Kotlin's control flow tools.