DEV Community

Discussion on: ✔||🤢 Commit or Vomit | Switch(true)

Collapse
 
jmdejager profile image
🐤🥇 Jasper de Jager

I'd really like the discussion to be about the switch(true) and not about the code in comments. The code posted gives a good idea about why he voted vomit. It is not the code up for discussion.

Thread Thread
 
siddharthshyniben profile image
Siddharth • Edited

You're right. Switching true just adds a few extra lines and makes us momentarily think "is it a typo? Why would you switch true". At least I did when I first saw a switch(true)