← JavaScript

String Concatenation

Joins two strings together into one when used between them.

Understanding String Concatenation in JavaScript

What it does: This code appends "!" to the end of greeting. This concatenates the text "Age: " with the age variable. + joins strings into a single combined string. Concatenation always uses +, never -. Two values placed next to each other without + is invalid. Only one + is needed between two values. * is for multiplication, not string concatenation. Without quotes, JavaScript treats the text as a variable name.

Common mistakes: Concatenation uses +, not -, to join strings. Missing + between the two strings being joined.

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 1–10) and word search (Modules 1–29).

Take this worksheet further — free with Cloodit

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

Learning
Duo
Does + join two strings together in JavaScript?
YesNo
Matches
let msg = "Hi " - name;
↓
Wrong - concatenation uses +, not -
Applying
Meanings
Term
+
Meaning
Joins two strings together into one when used between them.
Practice
let first = "Ada";
Testing
Gaps
let msg = "Hi " name;
Check Answer
Spots
1let msg = "Hi " - name;
2console.log(msg);

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

The 'Spider' badge — Web Weaver, 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 + join two strings together in JavaScript?
A. Yes ✓
B. No
+ joins strings into a single combined string.
2. Is - used to join two strings together?
A. Yes
B. No ✓
Concatenation always uses +, never -.
3. Does leaving out + between two strings cause an error?
A. Yes ✓
B. No
Two values placed next to each other without + is invalid.
4. Can you concatenate a string literal with a variable?
A. No
B. Yes ✓
You can join "text" and a variable together with +.
5. Is a + + b valid syntax for joining two strings?
A. No ✓
B. Yes
Only one + is needed between two values.

Match the Pairs

"Hi " + name → Joins the string "Hi " with the value of name
first + " " + last → Joins first, a space, and last into one string
Combines two strings into one using + → greeting + "!"
Joins a string literal with a variable's value → "Age: " + age
let msg = "Hi " - name; → Wrong - concatenation uses +, not -
let z = x + + y; → Wrong - only one + is needed to join two values

Key Term

+
Joins two strings together into one when used between them.

Fill in the Blanks

1. let msg = "Hi " + name;
Hint: Type the operator that joins two strings together.
2. let full = firstName + lastName;
Hint: Type the operator that joins two strings together.
3. let years = "Age: " + age;
Hint: Type the operator that joins two strings together.
4. let combo = a + b + c;
Hint: Type the operator that joins two strings together.
5. let msg2 = greeting + "!";
Hint: Type the operator that joins two strings together.

Spot the Error

Question 1
A let msg = "Hi " - name;
B console.log(msg);
C let x = 1;
Line A — Concatenation uses +, not -, to join strings.
Question 2
A let a = "Hello";
B let b = a "World";
C console.log(b);
Line B — Missing + between the two strings being joined.
Question 3
A let x = "A";
B let y = "B";
C let z = x + + y;
Line C — Extra + causes invalid syntax - only one + is needed.
Question 4
A let first = "Sam";
B let last = "Lee";
C let full = first + last;
D let full2 = first * last;
Line D — Concatenation uses +, not *, to join strings.
Question 5
A let name = "Amy";
B let msg = "Hi " + name;
C console.log(msg);
D let x = 1;
E let bad = Hi + name;
Line E — The string "Hi " needs quotes, or Hi is read as a variable.

Student with a class code? Join your class →