DEV Community

Discussion on: JS Refactoring Combo: Replace Nested If-Else with Guards

Collapse
 
victorocna profile image
Victor Ocnarescu

I have to agree with the author, it's kinda hard to read. Early returns (or guards) are better IMHO as they are simple to write, read and understand.