判断
1、 if..else if ...else
2、复合条件
let num = 10
if num > 5 && num < 15 {
print("Number is between 5 and 15")
}3、guard 语句:
guard condition else { // 如果条件不满足,提前退出函数或方法
return
}4、在switch语句中的控制转移:
switch语句中的控制转移:5、标签语句:
Last updated