语法:
switch(表达式) {case n:代码块break;case n:代码块break;default:默认代码块}
例如:
switch (new Date().getDay()) {case 6:text = "今天是周六";break;case 0:text = "今天是周日";break;default:text = "期待周末~";}
注意:如果 default 不是 switch 代码块中最后一个 case,请记得用 break 结束默认 case
