Conditions (if / match)
Decision making with if-else, if returning a value, and pattern matching with match.
Simple enough for a 5-year-old to understand
if / else
val number = 7if number % 2 == 0 then println("even")else println("odd")🎯 Exercise & Practice
Test what you've learned — answer, write code, check instantly. (1 left)