KotlinTutorial.kt
fun main() { greet("Herbert", 5) } fun greet(name: String, reps: Int) { var repsLeft = reps while (repsLeft > 0) { println("Hello, $name! Nice to meet you!") repsLeft-- } }
fun main() { greet("Herbert", 5) } fun greet(name: String, reps: Int) { var repsLeft = reps while (repsLeft > 0) { println("Hello, $name! Nice to meet you!") repsLeft-- } }