Declaring functions
Default parameters
Named parameters
Extension functions
Infix functions
Infix operators
Kotlin’s functions are almost the same as Java methods, although it’s closer in behavior to functions in JavaScript, because in Kotlin, functions are more than just a named collection of statements. In Kotlin, functions are first-class citizens; you can use a function wherever you could use a variable. You can pass them as parameters to other functions, and you can return functions from other functions as well. But before we can dive into that topic, we ...