Logical operator !
The not operator. It reverses a boolean: !true is false and !false is true. Put it before a value or bracket, like !(score >= 50). Read it as 'not'.
Understanding Logical operator ! in ACARA Digital Technologies Years 7–8
What it does: The comparison inside the brackets is checked first, and then ! reverses its true or false answer. !isClosed reads as 'not closed'. If isClosed is true, isOpen becomes false, and if isClosed is false, isOpen becomes true. ! flips false to true. Not false means true. ! is read as 'not'. So !isRaining reads as 'not isRaining'. The brackets make ! reverse the whole comparison. Without them, ! only applies to age. ! always goes in front of the boolean it reverses, like !done or !(x > 5). isLoggedIn is true, and not true is false. Since !false is true, isNight would be true. To get false, use !true or just write false.
Common mistakes: Without brackets, ! only reverses score, not the whole comparison. Put the comparison in brackets: !(score >= 50). The symbol for 'not' in JavaScript is !, not ~. It should be !isOpen so true becomes false.
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
!Fill in the Blanks
Spot the Error
Student with a class code? Join your class →