October 2019
Intermediate to advanced
434 pages
11h 54m
English
Earlier, we saw a basic example of adding a parameter to a function:
fun helloFunctions(greeting: String) { println("$greeting Kotlin Functions")}
Parameters can be added after a function name using the Pascal notation of name: Type. Passing an argument to a function works the same as in Java:
fun main(args: Array<String>) { helloFunctions("Hello!")}
Functions with a single parameter would be quite limited, and, thankfully, we can add multiple parameters to our functions as needed.
Read now
Unlock full access