DEV Community

Discussion on: Keeping your code clean by sweeping out "if" statements

Collapse
 
developerofstuff profile image
Marcus Chibucos

Personally, I found your Map code much easier to read than the ifs. I have always struggled with getting lost in repetition. The Map approach places proper emphasis on the relevant information, removing distraction. Thanks for this perspective.

Collapse
 
tomazfernandes profile image
Tomaz Lemos

You're welcome Marcus, thanks for your feedback!

Collapse
 
tomazfernandes profile image
Tomaz Lemos

Hi Marcus! I've written a blog post about another pattern, if you'd like to take a look I'd really appreciate your feedback on that as well.

Thanks again and happy new year!