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;
}
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;
}