Conclusion
In this lesson, you’ve looked at how you can create functions in Kotlin. In the process, you learned:
- How to create functions.
- How to specify arguments for functions.
- How to return values from functions.
- How every function has an implicit return type of Unit.
- How to use default arguments to skip certain parameters when invoking functions.
- How to use named arguments to make function calls more readable.