4 ms·
Then do something like hxa's example. Maintaining a return variable isn't always bad, it's just weird to think of it as functionally better than multiple return
by bwh2 14y ago
Then do something like hxa's example. Maintaining a return variable isn't always bad, it's just weird to think of it as functionally better than multiple returns. I tend to find a lot of errors and bugs in heavily nested code because it involves tracking a lot of variable state.