Re:JavaScript. But less iffy
by DeBraid on Saturday March 25, 2017 @09:37PM
(#13958537)
Excellent piece. Esp. this:
> There are a few simple patterns we can apply that make conditionals less intertwined. They include: ‘return early’,‘use ternaries’, ‘replace switch-statements with objects.’ These are not silver bullets, but rather, handy weapons for fighting complexity.
> There are a few simple patterns we can apply that make conditionals less intertwined. They include: ‘return early’,‘use ternaries’, ‘replace switch-statements with objects.’ These are not silver bullets, but rather, handy weapons for fighting complexity.