I have a switch case, and I want to direct 3 different possible cases to one outcome using the double pipe.
var type = "JPEG"
switch(type){
    case "PNG" || "JPG" || "JPEG":
    alert("works");
    break;
    default:
    alert("not working");
    break;
}
The obvious thing to do would be making a separate case for each of the file types, but there must be a more efficient way, that resembles my attempt.
 
     
     
     
    