Functions
Function definition with def, parameters, return type, and anonymous functions.
Simple enough for a 5-year-old to understand
Define and call functions
def greet(name: String): Unit = println(s"Hello $name!")greet("Alex")🎯 Exercise & Practice
Test what you've learned — answer, write code, check instantly. (1 left)