Please enable JavaScript to use CodeHS

CodeHS Glossary


Short Circuit Evaluation General

A short cut when evaluating boolean expressions. If the result can be determined solely by the first part of a boolean expression, the second part is not evaluated, it is skipped. Since true OR (anything) will evaluate to true, the second part of an OR statement will not be evaluated if the first part is true. Since false AND (anything) will evaluate to false, the second part of an AND statement will not be evaluated if the first part is false.