Design comparison
SolutionDesign
Solution retrospective
- Is there any posibility to reduce else/if statements in JS? Feels stupid to repeat it.
P.s. still looking for coding buddy, with whom we could improve each others code.
Community feedback
- @mathew12tanPosted over 3 years ago
Hi Jaronimas, maybe you can use switch instead of else/if. Hopes this help. https://www.w3schools.com/js/js_switch.asp
0@jaronimas-codesPosted over 3 years ago@mathew12tan thank you very much for good suggestion! I know switch, just it haven't popped in my head, when I needed!
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord