帮忙看看啊
var num=25; switch(true){ case num<0: alert("less than 0"); break; case num>=0&&num<=20: alert("between 0 and 20"); default: alert("more than 20");} 括号里的true代表什么,与下边的case是怎样的关系?
var num=25; switch(true){ case num<0: alert("less than 0"); break; case num>=0&&num<=20: alert("between 0 and 20"); default: alert("more than 20");} 括号里的true代表什么,与下边的case是怎样的关系?
2017-04-02
举报