DEV Community

Discussion on: Which would you prefer and why?

Collapse
 
tterb profile image
Brett Stevenson

I agree with the other responses that the second function looks much cleaner in this example, though it could also become less intuitive as the complexity of the logic that replaces // do stuff for option(n) increases.