Also, I am pretty sure function parameters cannot ...
# getting-started
e
Also, I am pretty sure function parameters cannot be reassigned. But, interestingly, parameters can simply be redeclared to be ignored. Example:
Copy code
private fun test(foo: Boolean): String? {
    // foo = false // does not compile.
    val foo = false // compiles.
    return if (foo) "hello" else null
}