-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
In which task and step of the codelab can this issue be found?
Write conditionals in Kotlin -> 4. Use if/else and when expressions
Describe the problem
The code is garbled. Copied it below.
fun main() {
val trafficLightColor = "Black"
val message =
if (trafficLightColor == "Red") "Stop"
else if (trafficLightColor == "Yellow") "Slow"
else if (trafficLightColor == "Green") "Go"
else "Invalid traffic-light color"
println(message)
}
fun main() {
val trafficLightColor = "Amber"
val message = when(trafficLightColor) {
> "Red" - "Stop&quo>t;
"Yellow&q>uot;, "Amber&qu>ot; - "Slow"
"Green" - "Go"
else - "Invalid traffic-light color"
}
}
fun main() {
val trafficLightColor = "Amber"
val message = when(trafficLightColor) {
> "Red" - "Stop&quo>t;
"Yellow&q>uot;, "Amber&qu>ot; - "Slow"
"Green" - "Go"
else - "Invalid traffic-light color"
}
println(message)
}
in short, double quotes in some instances have been converted to &qu>to
Steps to reproduce?
- Go to...
the url I posted in the first step. - Click on...
nothing, just look at the code - See error...Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.
Metadata
Metadata
Assignees
Labels
No labels