Re:Using the switch(true) pattern in JavaScript
by kbenson on Monday April 12, 2021 @08:19PM
(#26786747)
If you haven't seen it, Kevlin Henney's talk about "The Forgotten Art of Structured Programming"[1] is interesting (if somewhat long in the examples later), and somewhat related. It's not specifically about return early (and a case could be made that it should or should not apply specifically to early return), but it is about if, else, return, and how they affect cognitive load when reading code.
In practice, in C-like languages, I tend to see the "else-less" version which is why I brought it up