4 ms·
Redux is a wonderful piece of software and of course I use switch statements. I was referring to this question on reddit/r/javascript which kind of boggled my m
by labrador 10y ago
Redux is a wonderful piece of software and of course I use switch statements. I was referring to this question on reddit/r/javascript which kind of boggled my mind. I didn't know there were people advocating against switch statements.
https://www.reddit.com/r/javascript/comments/2582qv/is_switch_ever_a_good_idea_in_javascript/ https://www.reddit.com/r/javascript/comments/2582qv/is_switc...
- Forlien 10y agoDid 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...