Tom Smykowski
Feb 27, 2022

--

Both ways are hard to read for me. They are also hard to maintain. What I like to do is create an associative array to create a dictionary. It makes code perfectly nice to read and maintain. It is also a good starting point for later refactoring for example to extract a nice function, service or class to provide the decision answer.

--

--

Tom Smykowski
Tom Smykowski

Written by Tom Smykowski

🚀 Senior/Lead Frontend Engineer | Angular · Vue.js · React | Design Systems, UI/UX | Looking for a new project! 📩 contact@tomasz-smykowski.com

No responses yet