no / laziness. there is no difference in
for(var i = 0; i < a.length;) a[i++] = 0;
and only minimal difference with
for(var i = 0; i < a.length; i++) a[i] = 0;
the first one is several ms faster after several billion iteration steps; aka. premature optimization
EDIT:
if((a==0) || (b == 0));
it makes no sense as it does nothing.
but expressions like
a==0 || (b=0); //or maybe sth like this: //var noop = ()=>void 0;
they are very useful to me because they are short and readable, and the additional if-statement does not add any meaning to readability or understanding (at least as soon as you know this template).
source share