5 Useful Swift One-Liners to Code Like a Pro
1. One-Liner If-Else Operator
Did you know that you can replace this simple if-else statement:
let money = 100
if money > 0 {
print("Some money")
} else {
print("No money")
}
With this neat little one-liner expression?
money > 0 ? print("Som...
artturijalli.hashnode.dev2 min read