Upload
tomohiro-kumagai
View
108
Download
3
Embed Size (px)
Citation preview
#minna_de_swift
switch v {
case pattern1: print("match 1")
case pattern2: print("match 2")
default: print("others") }
switch device {
case "iPhone 6": print("6")case "iPhone 7", "iPhone 7 PLUS": print("7")case let x where x.hasSuffix("X"): print("X")default: print("?")}