Shorthand updates: +=, -= and ++
A shorthand update. Operators like +=, -=, ++ and -- change a variable using its own value, so total += price means total = total + price. count++ adds 1 and count-- takes away 1.
Understanding Shorthand updates: +=, -= and ++ in ACARA Digital Technologies Years 7–8
What it does: The ++ operator is the quickest way to add 1 to a variable and it means the same as count = count + 1. += adds the value on its right to the variable. The operator is written +=, with the plus first. =+ is not a shorthand update. ++ is shorthand for count = count + 1. It always adds exactly 1. -- is the decrement operator and it takes away 1. A single - on its own is not a valid statement. score += 5 means score = score + 5, so 10 + 5 = 15. The old value is kept and added to.
Common mistakes: A const variable cannot be changed, so count++ would cause a TypeError. Use let count = 0; for a variable that gets updated. The operator is += (plus first, then equals). =+ just assigns positive 5, so total becomes 5 instead of 15. It should be total += 5;.
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 562–580) and word search (Modules 522–580).
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
total += priceFill in the Blanks
Spot the Error
Student with a class code? Join your class →