Re:Using the switch(true) pattern in JavaScript
by brundolf on Monday April 12, 2021 @03:44PM
(#26784191)
Worth noting that elses don't require curly braces, which are where most of the visual noise is coming from in your example:
I think this is more clear than either of the above
[ Parent
| on HN ]