Conditions (if / when)
Decision making with if-else, if returning a value, and multi-branched when structure.
Simple enough for a 5-year-old to understand
if / else
If a condition is true, the first block runs; otherwise, the else block runs.
val number = 7if (number % 2 == 0) { println("even")} else { println("odd")}🎯 Exercise & Practice
Test what you've learned — answer, write code, check instantly. (1 left)