![Alligator.io π on Twitter: "π€ Optimizing the switch Statement in # JavaScript β https://t.co/hvA2I0Hbg7 by @wle8300 Did you know you can combine multiple cases together to execute the same block of code? https://t.co/nG2gtcfTtn" / Alligator.io π on Twitter: "π€ Optimizing the switch Statement in # JavaScript β https://t.co/hvA2I0Hbg7 by @wle8300 Did you know you can combine multiple cases together to execute the same block of code? https://t.co/nG2gtcfTtn" /](https://pbs.twimg.com/media/D9b4_tUWkAMoFOz.jpg:large)
Alligator.io π on Twitter: "π€ Optimizing the switch Statement in # JavaScript β https://t.co/hvA2I0Hbg7 by @wle8300 Did you know you can combine multiple cases together to execute the same block of code? https://t.co/nG2gtcfTtn" /
![javascript - "switch" statement only allows the first 2 "case" blocks - regardless of order: Why? - Stack Overflow javascript - "switch" statement only allows the first 2 "case" blocks - regardless of order: Why? - Stack Overflow](https://i.stack.imgur.com/JfpPB.jpg)
javascript - "switch" statement only allows the first 2 "case" blocks - regardless of order: Why? - Stack Overflow
![Here's Why It is Not a Good Idea to Use Switch in JavaScript | By Somnath Singh | JavaScript in Plain English Here's Why It is Not a Good Idea to Use Switch in JavaScript | By Somnath Singh | JavaScript in Plain English](https://miro.medium.com/v2/resize:fit:1400/1*GVJ24bmRD6oYHaqMkBHtkw.png)