← VCE Applied Computing U1O2

Camel casing

A naming style with no spaces: the first word is lowercase and each later word starts with a capital letter, like studentScore. PascalCase also capitalises the first word.

Understanding Camel casing in VCE Applied Computing U1O2

What it does: totalPoints begins with a lowercase word and capitalises the next word, so it follows camelCase. LibraryBook capitalises the first letter of every word, which is PascalCase and suits a class name. Both styles have no spaces or underscores. Only PascalCase starts with a capital letter. Variable names cannot contain spaces, so the words must be joined and the second word capitalised.

Common mistakes: A camelCase variable name must start with a lowercase letter. StudentScore is PascalCase, which is for class names. It should be studentScore. In camelCase every word after the first starts with a capital letter. lastname should be lastName so the two words are easy to see.

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 8–88) and word search (Modules 8–124).

Take this worksheet further — free with Cloodit

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

Learning
Duo
Which variable name uses camelCase?
studentScoreStudentScore
Matches
StudentScore = 85
↓
The first word is capitalised. In camelCase a variable should start lowercase: studentScore.
Applying
Meanings
Term
camelCase
Meaning
A naming style with no spaces: the first word is lowercase and each later word starts with a capital letter, like studentScore. PascalCase also capitalises the first word.
Practice
class StudentRecord {
Testing
Gaps
console.log();
Check Answer
Spots
1let studentScore = 85;
2let StudentScore = 85;

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

The 'Walrus' badge — Method Master, 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. Which variable name uses camelCase?
A. studentScore ✓
B. StudentScore
camelCase starts with a lowercase letter. StudentScore starts with a capital, so it is PascalCase.
2. Which name is NOT camelCase?
A. studentScore
B. student_score ✓
student_score uses underscores, which is snake_case. camelCase has no separators and capitalises each later word.
3. Which is the correct camelCase version of 'total game points'?
A. totalGamePoints ✓
B. totalgamepoints
Each word after the first starts with a capital letter, which makes the name easier to read.
4. A class is named using PascalCase. Which name fits?
A. BankAccount ✓
B. bankAccount
PascalCase capitalises the first word as well, so BankAccount is PascalCase and bankAccount is camelCase.
5. Which variable name follows camelCase rules?
A. first name
B. firstName ✓
Variable names cannot contain spaces. camelCase removes the spaces and capitalises each later word.

Match the Pairs

studentScore → A camelCase variable name: first word lowercase, later word capitalised, no spaces
class BankAccount: → A PascalCase class name: every word starts with a capital letter, including the first
A camelCase name for a variable holding a player's total points → totalPoints = 0
A PascalCase name for a class that models a library book → class LibraryBook:
StudentScore = 85 → The first word is capitalised. In camelCase a variable should start lowercase: studentScore.
student score = 85 → The name has a space in it. Camel casing joins words with no spaces: studentScore.

Key Term

camelCase
A naming style with no spaces: the first word is lowercase and each later word starts with a capital letter, like studentScore. PascalCase also capitalises the first word.

Fill in the Blanks

1. let studentScore = 85; console.log(studentScore);
Hint: Type the camelCase variable name declared on the line above, with the same spelling and capital letter.
2. class StudentRecord {} let record = new StudentRecord();
Hint: Type the PascalCase class name defined on the first line to create an object from it.
3. let highScore = 90; console.log(highScore);
Hint: Type the keyword that declares a new variable in JavaScript.
4. let mathsMark = 70; let englishMark = 80; let totalMarks = mathsMark + englishMark;
Hint: Type the operator that adds the two camelCase variables together.
5. let firstName = "Ava"; let lastName = "Nguyen"; let fullName = firstName + " " + lastName;
Hint: Type the camelCase variable that holds the surname, declared on line two.

Spot the Error

Question 1
A let studentScore = 85;
B let StudentScore = 85;
C console.log(studentScore);
Line B — A camelCase variable name must start with a lowercase letter. StudentScore is PascalCase, which is for class names. It should be studentScore.
Question 2
A let firstName = 'Ava';
B let lastname = 'Nguyen';
C let lastname = 'Nguyen';
Line C — In camelCase every word after the first starts with a capital letter. lastname should be lastName so the two words are easy to see.
Question 3
A class studentRecord {
B constructor(name) {
C this.name = name;
D }
E }
Line A — Class names use PascalCase, so the first word is capitalised too. It should be StudentRecord, not studentRecord.
Question 4
A let maxSpeed = 120;
B let currentSpeed = 80;
C let speedLimit = 100;
D let FUELLEVEL = 40;
Line D — All capitals with no word breaks is not camelCase. The first word is lowercase and the second word starts with a capital, so it should be fuelLevel.
Question 5
A class GameScore {
B constructor() {
C this.highScore = 0;
D this.PlayerName = 'Ava';
E }
F }
Line D — Properties inside a class use camelCase, which starts with a lowercase letter. PlayerName should be playerName.

Student with a class code? Join your class →