You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In which task and step of the codelab can this issue be found?
named arguments
Describe the problem
function definition:
fun birthdayGreeting(name: String, age: Int): String {
val nameGreeting = "Happy Birthday, $name!"
val ageGreeting = "You are now 5 years old!"
return "$nameGreeting\n$ageGreeting"
}
statement in main:
println(birthdayGreeting(name = "Rex", age = 2))
output:
Happy Birthday, Rex! You are now 2 years old!
output should be:
Happy Birthday, Rex!
You are now 2 years old!
or you should eliminate \n in this stateement:
return "$nameGreeting\n$ageGreeting"
Steps to reproduce?
Go to...
Click on...
See error...
Versions Android Studio version: API version of the emulator:
Additional information Include screenshots if they would be useful in clarifying the problem.
The text was updated successfully, but these errors were encountered:
URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-compose-functions?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-1-pathway-1%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-functions#5
In which task and step of the codelab can this issue be found?
named arguments
Describe the problem
function definition:
fun birthdayGreeting(name: String, age: Int): String {
val nameGreeting = "Happy Birthday, $name!"
val ageGreeting = "You are now 5 years old!"
return "$nameGreeting\n$ageGreeting"
}
statement in main:
println(birthdayGreeting(name = "Rex", age = 2))
output:
Happy Birthday, Rex! You are now 2 years old!
output should be:
Happy Birthday, Rex!
You are now 2 years old!
or you should eliminate \n in this stateement:
return "$nameGreeting\n$ageGreeting"
Steps to reproduce?
Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.
The text was updated successfully, but these errors were encountered: