let point = (3,3)
switch point {
case let (x,y) where x == y
print("xxxxx")
default:
print("yyyyy")
}
let age = 123
if case 10...19 = age where age >= 10 {
print("acv")
}
if case xxx = age
是把age
判斷一下在不在case
里
where
就是繼續(xù)限定條件在一個bool
的范圍內(nèi)