生活中的 if 指令練習
Published in
1 min readNov 28, 2017
if 週六下雨{noHiking()sleepLate()haveBrunch()goDancing()}
如果依年齡列出不同訊息,則可列如下:
var age = 25if age > 25 {let message = “nice!”print(message)}if age < 25 {let message = “Sorry”print(message)}if age == 25 {let message = “you are the one!”print(message)}