4 ms·
Did you link the wrong page? It looks like they are advocating switch statements.
by Forlien 10y ago
Did you link the wrong page? It looks like they are advocating switch statements.
- labrador 10y agoIf you read down, there are people against them. I didn't know this was a thing. The top comment is saying of course, switch statements are fine. There are other posts if you search for switch in r/JavaScript. This one is probably more indicative: https://www.reddit.com/r/javascript/comments/3a4ras/how_often_do_you_use_the_javascript_switch/ https://www.reddit.com/r/javascript/comments/3a4ras/how_ofte...