Kotlin Tutorial

Kotlin Functions

Functions

Functions group reusable logic behind a name you can call anywhere.

fun greet(name: String) = "Hello, $name"
Try it Yourself
Run this KOTLIN example in your local environment or course sandbox.