DEV Community

Discussion on: If/else or just if?

Collapse
 
jacksonelfers profile image
Jackson Elfers

First one. Brackets are consistent I feel and easier to assess. I've heard the argument about one return per function although then you're potentially creating a local variable to manage state. What's truly important is that your developers can effectively read it, after all the computer obviously doesn't care.