Designly
Nov 15, 2024

--

Use switch when it makes sense and use of then else when it makes sense. I prefer switch because it looks neater to me. Just don’t forget that break statement! 🤣 actually sometimes it’s useful to stack 2 or more cases without a break to match multiple. I do that all the time.

--

--

Designly
Designly

Written by Designly

Full-stack web developer and graphics designer.

No responses yet