if
1 | 类型1 |
判断条件
表达式复杂勤用括号
三目运算符
1 | if(A) B |
switch
1 | switch(expression){//A 为一个常量表达式 |
If the case label matches the switch’s expression, then the statements that follow that label are executed up until the break statement is encountered.
若没有break,一直执行,直到break