Do not Stop using nested Ternary Operators — but use them wisely

Di.rk
Dec 6, 2021

--

Recently I read an article claiming the opposite and I thought the example below can be improved.

with adding locals and using another formatting:

But even better would be to use object literals to get rid of those if then else or ternary hells.

What do you think?

--

--