Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

switch case in swift language

let liveAlbums = 2

switch liveAlbums {
case 0:
    print("You're just starting out")

case 1:
    print("You just released iTunes Live From SoHo")

case 2:
    print("You just released Speak Now World Tour")

default:
    print("Have you done something new?")
}
Source by www.hackingwithswift.com #
 
PREVIOUS NEXT
Tagged: #switch #case #swift #language
ADD COMMENT
Topic
Name
2+5 =