Default Values & Named Parameters

Discover how to use default parameter values to increase the flexibility of your functions and how to call functions using named parameters.

In Kotlin, you can define default values for function parameters to make them optional.

Default Parameter Values #

Let’s say you have a function that joins a collection of strings into a single string:

Get hands-on with 1000+ tech skills courses.