I am working on a project which requires some pretty intricate JavaScript processing. This includes a lot of nested if-elses in quite a few places.
if
else
In many languages, is a common practice to invert if statements to reduce nesting or use preconditions.
And having less nesting in your code improves code readability and maintainability.