Swift - Control Flow
Which of the following is the correct syntax for a compound case in Swift?
switch value {
case 1, 2, 3:
print("One to three")
default:
print("Other")
}Which of the following is the correct syntax for a compound case in Swift?
switch value {
case 1, 2, 3:
print("One to three")
default:
print("Other")
}15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions