Update kotlin.md (#2096)

Added return type on method.

Co-authored-by: Rico Sta. Cruz <rstacruz@users.noreply.github.com>
This commit is contained in:
Menno Spijker 2024-03-29 08:44:16 +01:00 committed by GitHub
parent a7b5dbe1e7
commit 4b05ba3b0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ val four = 2.timesTwo()
### Default Parameters
```kotlin
fun getGreeting(person: Person, intro: String = "Hello,") {
fun getGreeting(person: Person, intro: String = "Hello,"): String {
return "$intro ${person.name}"
}