Please enable JavaScript to use CodeHS

Chapter 3

Boolean Expressions and if Statements

3.5 Compound Boolean Expressions

What Are Logical Operators?

The AND Operator

The OR Operator

Short Circuit Evaluation

The NOT Operator

Order of Operations

Light Switch

Number in Range

Pizza Slices

Check Your Understanding

  1. Invalid Answer

Exercise: Compound Roller Coaster

Vocabulary

Term Definition
Logical Operators Can be used to connect boolean expressions to make more complex expression. NOT ! AND && OR ||
Short Circuit Evaluation When the result of a logical expression using && or || can be determined by evaluating only the first Boolean operand, the second is not evaluated.
Nested if Statements The process of placing if statements within if statements.