Multiple choice

The && and || operators ____.

  1. compare two numeric values

  2. combine two numeric values

  3. compare two Boolean values

  4. combine two Boolean values

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The logical AND (&&) and logical OR (||) operators are used to combine Boolean values or expressions. They evaluate to true or false based on the truth values of their operands. && returns true only if both operands are true, while || returns true if at least one operand is true.