If cond1
and cond2
are not simple booleans but properties or functions with side-effects then there is a difference because in the first version cond2
will always be evaluated and the side-effects will therefor occur.
↧
Answer by heijp06 for Two if conditions or one if with OR
↧