4.5. Range operators
let today = 8
switch today{
case 1...5:
print("Weekday!")
case 6..<8:
print("Weekend!")
default:
print("Invalid day!")
}Last updated
let today = 8
switch today{
case 1...5:
print("Weekday!")
case 6..<8:
print("Weekend!")
default:
print("Invalid day!")
}Last updated