← JavaScript

OOP – Classes & Objects

Declares a blueprint for creating objects with shared properties and methods.

Understanding OOP – Classes & Objects in JavaScript

What it does: class is exactly the keyword used to define this blueprint. new is the keyword that builds a new object from a class. class defines the shape and behavior that objects will share. JavaScript is case-sensitive, so 'class' must be lowercase. Parentheses are needed to actually call the class constructor. Each call to new creates its own independent object. new builds an actual object based on the Dog blueprint. Declares a blueprint for creating objects with shared properties and methods.

Common mistakes: 'class' must be lowercase - a capital C causes an error. This line is missing a semicolon, but that's not required in JS.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

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 41–52) and word search (Modules 21–52).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Does class declare a blueprint for creating objects?
YesNo
Matches
Class Dog { name = "Rex"; }
↓
Wrong - 'class' must be lowercase
Applying
Meanings
Term
class
Meaning
Declares a blueprint for creating objects with shared properties and methods.
Practice
class Dog {
Testing
Gaps
Dog {
Check Answer
Spots
1Class Dog {
2name = "Rex";

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Moon Jellyfish' badge — Orbital Streak, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Does class declare a blueprint for creating objects?
A. Yes ✓
B. No
class defines the shape and behavior that objects will share.
2. Does new create an instance of a class?
A. No
B. Yes ✓
new builds a new object based on the class blueprint.
3. Must 'class' be written in lowercase?
A. Yes ✓
B. No
JavaScript is case-sensitive, so 'class' must be lowercase.
4. Must 'new' be written in lowercase?
A. Yes ✓
B. No
JavaScript is case-sensitive, so 'new' must be lowercase.
5. Is 'Class' with a capital C valid JavaScript syntax?
A. Yes
B. No ✓
JavaScript keywords are case-sensitive and must be lowercase.

Match the Pairs

class Dog { name = "Rex"; } → Declares a blueprint for creating Dog objects
new Dog() → Creates a new instance of the Dog class
Declares a reusable blueprint for creating objects → class
Creates an instance of a class → new
Class Dog { name = "Rex"; } → Wrong - 'class' must be lowercase
let d = New Dog(); → Wrong - 'new' must be lowercase

Key Term

class
Declares a blueprint for creating objects with shared properties and methods.

Fill in the Blanks

1. class Dog {
Hint: Type the keyword that declares a class.
2. let myDog = new Dog();
Hint: Type the keyword that creates a new instance of a class.
3. class Cat {
Hint: Type the symbol that opens the class body.
4. let c = new Cat();
Hint: Type the keyword that creates a new instance of a class.
5. class Bird {
Hint: Type the symbol that opens the class body.

Spot the Error

Question 1
A Class Dog {
B name = "Rex";
C }
Line A — 'class' must be lowercase - a capital C causes an error.
Question 2
A class Cat {
B name = "Tom"
C }
Line B — This line is missing a semicolon, but that's not required in JS.
Question 3
A class Bird {
B name = "Tweety";
C ]
Line C — The class body must close with }, not ].
Question 4
A class Fish {
B name = "Nemo";
C }
D let f = New Fish();
Line D — 'new' must be lowercase - a capital N causes an error.
Question 5
A clas Dog {
B name = "Rex";
C }
Line A — 'class' is misspelled as 'clas'.

Student with a class code? Join your class →