DEV Community

Discussion on: If/else or just if?

Collapse
 
scooby359 profile image
Chris

I like this style more - it looks clearer to me, and from the point of working through the logic, I like that the returns just end the function.

If a block just set a value and returned it later, there's a chance it could be reassigned in another buggy block, so I think there's less risk in this style too.