Hi, you can do that :
let scoreDecoration: String
if teamScore > 10 {
scoreDecoration = "🎉"
} else {
scoreDecoration = ""
}
Or use ternary operator :
let scoreDecoration = teamScore > 10 ? "🎉" : ""
Topic:
Programming Languages
SubTopic:
Swift
Tags: