How would you use a switch
case
when you need to test for a or b in the same case?
switch (pageid) {
case "listing-page" || "home-page":
alert("hello");
break;
case "details-page":
alert("goodbye");
break;
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…