DEV Community

Discussion on: Rethinking JavaScript: The if statement

Collapse
 
joelnet profile image
JavaScript Joel

I love early returns and I use them in codebases that are imperative and OOP.

But when creating a functional codebase, 98% of my functions have a single statement, and that statement is a return.

When you eliminate statements and blocks, you will find that your codebase naturally becomes more functional.