Logical operator ||
Logical OR joins two conditions. It is true when at least one is true, and false only when both are false. Example: day === 'Sat' OR day === 'Sun' is true on a weekend.
Understanding Logical operator || in ACARA Digital Technologies Years 7–8
What it does: The condition is true if the score is 0 or the score is 100. Only one has to be true, which is how || works. 5 > 10 is false and 2 > 8 is false, so the || result is false and the console shows false. || is true when at least one side is true. day === "Sat" is true, so the whole condition is true. Only one side needs to be true for || to give true. Each side of || needs its own full condition. "Sun" on its own is not a comparison with day. Both sides are false (Wed is not Sat and not Sun), so the || result is false.
Common mistakes: A single | is a different (bitwise) operator. OR needs two bars, so it should be console.log(sat || sun);. Each side of || must be a full condition. The right side is missing temp, so it should be temp > 35.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 583–598) and word search (Modules 583–613).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
logical ORFill in the Blanks
Spot the Error
Student with a class code? Join your class →