Else-expression
var rained = false
if (rained) {
println("No need to water the plants today.")
} else {
println("The plant needs to be watered!")
}
// print: The plant needs watering!
Comments
var rained = false
if (rained) {
println("No need to water the plants today.")
} else {
println("The plant needs to be watered!")
}
// print: The plant needs watering!