📅  最后修改于: 2022-03-11 15:04:00.738000             🧑  作者: Mango
switch (new Date().getDay()) { // input is current day
case 6: // if (day == 6)
text = "Saturday";
break;
case 0: // if (day == 0)
text = "Sunday";
break;
default: // else...
text = "Whatever";
}