- conditionally declare a variable
- return early
- avoid indenting the remaining checks (as in the other examples)
I prefer returning early and using the implicit return for the "happy path". What do you think?
- conditionally declare a variable
- return early
- avoid indenting the remaining checks (as in the other examples)
I prefer returning early and using the implicit return for the "happy path". What do you think?