I actually don't know how to phrase this question properly, apologize in advance.
In my code review, people suggested to me that if and else conditions should be comparable by nature, like the following:
if (a == 0)..
else if (a == 1)
else if (a != 3)
else...
basically, these are evaluating within the same business scope - var a in this case.
A extreme counter example would be:
if (a == 0)
else if (window.size != server.config.size)
else if (user.b == this.user)
else...
Some thing in the grey area:
if (a == 0)
else if (b == c)
vs.
if (a == 0)
else { // implying a != 0
if (b == c)
}
I have not found any programming practice/guide in something this basic. Please let me know there is any reference to how people organize their if else.