3 ms·
Your preferred version is often called "guard clause" when it's in the beginning of functions. Although there's nothing preventing them from being in the middle
by whstl 3y ago
Your preferred version is often called "guard clause" when it's in the beginning of functions. Although there's nothing preventing them from being in the middle...
I do agree that it's much better for readability.