3 ms·
I’ve long been a fan of return early and often. The code shown with the if with two returns I think adds cognitive complexity - there is no need for the else.
by dugmartin 5y ago
I’ve long been a fan of return early and often.
The code shown with the if with two returns I think adds cognitive complexity - there is no need for the else.