How would you use a switch
case
when you need to test for a or b in the same case?(你会如何使用switch
case
,当你需要在相同的情况下,以测试a 或 b?)
switch (pageid) {
case "listing-page" || "home-page":
alert("hello");
break;
case "details-page":
alert("goodbye");
break;
}
ask by Andres translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…