April 2019
Beginner to intermediate
698 pages
15h 15m
English
As functions are the building blocks of our code, they need to be versatile to cater for anything we might need to do. We have already seen how we can create very varied parameter lists and return types, as well as deciding in code when to return to the calling code. As we progress, you will see that we need even more options. What follows is a quick glance at some more Kotlin function options that we will introduce now, and then get around to using for real at various points throughout the book.
A default parameter is where we the programmers provide a value (default) for a parameter that will be used if the code that calls the function does not provide it. A named argument is when the code ...
Read now
Unlock full access