a = a && b;
and
a
is false, b
will not be looked at. This is important to remember in case when b
is some expression and you want it to be evaluated no matter what a
is:
a = a && anImportantUpdateFunction();
If
a
is false, then anImportantUpdateFunction()
will not be called.
No comments:
Post a Comment