← JavaScript

More Arithmetic: % and **

An operator that returns the remainder left over after dividing one number by another.

Understanding More Arithmetic: % and ** in JavaScript

What it does: This expression checks whether num is an even number. This raises 3 to the power of 3, or 3 * 3 * 3. % gives you what's left over after dividing. ** performs exponentiation, like squaring or cubing a number. JavaScript uses **, not ^, for exponentiation. JavaScript uses %, not the word mod, for remainder. 2 raised to the power of 4 is 16. The remainder operator is a single %, not %%.

Common mistakes: Use %, not the word mod, for the remainder operator. JavaScript uses ** for exponents, not ^.

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 % return the remainder of a division?
YesNo
Matches
console.log(10 mod 3);
↓
Wrong - use % instead of the word mod
Applying
Meanings
Term
%
Meaning
An operator that returns the remainder left over after dividing one number by another.
Practice
console.log(10 % 3);
Testing
Gaps
console.log(10 3);
Check Answer
Spots
1console.log(10 mod 3);
2console.log(10 % 3);

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

The 'Moray Eel' badge — Lurking Debugger, 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 % return the remainder of a division?
A. No
B. Yes ✓
% gives you what's left over after dividing.
2. Does ** raise a number to a power?
A. Yes ✓
B. No
** performs exponentiation, like squaring or cubing a number.
3. Is ^ used for exponents in JavaScript?
A. No ✓
B. Yes
JavaScript uses **, not ^, for exponentiation.
4. Can % be used to check if a number is even?
A. Yes ✓
B. No
num % 2 === 0 checks whether a number is even.
5. Is 'mod' a valid JavaScript operator for remainder?
A. Yes
B. No ✓
JavaScript uses %, not the word mod, for remainder.

Match the Pairs

10 % 3 → Returns the remainder after dividing 10 by 3
2 ** 4 → Raises 2 to the power of 4
Checks if a number divides evenly with no remainder → num % 2 === 0
Multiplies a number by itself repeatedly → 3 ** 3
console.log(10 mod 3); → Wrong - use % instead of the word mod
console.log(2 ^ 4); → Wrong - use ** instead of ^ for exponents

Key Term

%
An operator that returns the remainder left over after dividing one number by another.

Fill in the Blanks

1. console.log(10 % 3);
Hint: Type the operator that returns the remainder of a division.
2. console.log(2 ** 4);
Hint: Type the operator that raises a number to a power.
3. let remainder = 7 % 2;
Hint: Type the operator that returns the remainder of a division.
4. let cube = 3 ** 3;
Hint: Type the operator that raises a number to a power.
5. let isEven = num % 2 === 0;
Hint: Type the operator that returns the remainder of a division.

Spot the Error

Question 1
A console.log(10 mod 3);
B console.log(10 % 3);
C console.log(2 ** 4);
Line A — Use %, not the word mod, for the remainder operator.
Question 2
A console.log(2 ^ 4);
B console.log(2 ** 4);
C console.log(10 % 3);
Line A — JavaScript uses ** for exponents, not ^.
Question 3
A let r = 9 % 4;
B let s = 9 // 4;
C let p = 2 ** 3;
Line B — Remainder uses %, not //, in JavaScript.
Question 4
A let x = 5 % 2;
B let w = 5 pow 2;
C let z = 5 ** 2;
Line B — Exponents use **, not the word pow, in JavaScript.
Question 5
A let a = 8 % 3;
B let b = 8 ** 2;
C let c = 8 %% 3;
Line C — The remainder operator is a single %, not %%.

Student with a class code? Join your class →