4 ms·
I tend to prefer a style more like: if (!...) return 0; ... Because otherwise you can end up with lots of nested conditions which are very confusing
by jstanley 3y ago
I tend to prefer a style more like:
if (!...) return 0;
...
Because otherwise you can end up with lots of nested conditions which are very confusing to follow, even though they boil down to "do the thing if these are true, otherwise don't do the thing".