Switch case

switch myNum
{
 case 33 : print(myNum)
 case 0..<33: print("Young")
default: print("Old")
}

Notes:
0..<33
means a number from 0 to 33

Comments

Popular posts from this blog

Rotation

Swift Basics - Sets

Things to consider when designing the user interface