Shortcut evaluation of an expression is a computer optimization. For example if you know three things must all be true in order to proceed, you do not need to check condtions 2 and 3 if condition one is already known to be false.
In most languages we use the && notation for AND and the || notation for OR. The interesting thing about the these operations is that they behave in what is known as "Short Cut" evaluation.
Assume we have three boolean expressions A,B, and C. If we put them in an conditional statement using && we get:
if ( A && B && C )
{
do something;
}
We know that the only way this expression can be true is if A and B and C are all true. BUT, if A is false, we don't even need to consider B and C because we already know the entire expression is false.
Short Cut evaluation means that as soon as the program can determine that the expression is false No Further Evaluation takes place.
The OR version
Similar to AND, OR can also terminate early. For example:
if (A || B || C)
{
do something;
}