Answers for "function in kotlin"

4

function kotlin

// Declare a function in Kotlin
fun happyBirthday(name: String, age: Int): String {
    return "Happy ${age}th birthday, $name!"
}
// Call function
val greeting = happyBirthday("Anne", 32)
Posted by: Guest on October-24-2020
0

function in kotlin

kotlin function
Posted by: Guest on June-27-2021

Browse Popular Code Answers by Language