Creating an object with new
Creates an object from a class and passes the arguments to the constructor. Store it in a variable, e.g. const rex = new Dog('Rex', 3). Leaving out new causes an error.
Understanding Creating an object with new in ACARA Digital Technologies Years 9–10
What it does: The keyword new comes first, then the class name Dog and the arguments in brackets. If the constructor is constructor(name, age), then 'Rex' goes to name and 3 goes to age. Calling a class without new causes an error (TypeError: Class constructor Dog cannot be invoked without 'new'). Use new to create an object. Without a variable, the object is created but you have no name to reach it again. Storing it in const rex lets you use rex later. Classes must be called with new. Leaving it out stops the program with a TypeError. The class name must match exactly, including the capital letter. Cat is the class, so new Cat(...) is correct.
Common mistakes: The new keyword is missing. Set is a class, so calling it without new causes a TypeError. It should be const unique = new Set(nums);. Class names are case-sensitive. map (lowercase) does not exist, so JavaScript gives a ReferenceError. It should be new Map(pairs).
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 728–742) and word search (Modules 710–742).
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
new ClassName(arguments)Fill in the Blanks
Spot the Error
Student with a class code? Join your class →