Functions
Defining functions with fun, parameters, return type, default values, and single-expression bodies.
Simple enough for a 5-year-old to understand
Define and call functions
You bind repetitive work to a name; then you call it with a single line.
fun greet(name: String) { println("Hello $name!")}greet("Alex")🎯 Exercise & Practice
Test what you've learned — answer, write code, check instantly. (1 left)