Skip to content
Advertisement

Test for multiple cases in a switch, like an OR (||)

How would you use a switch case when you need to test for a or b in the same case?

JavaScript

Advertisement

Answer

You can use fall-through:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement