More Arithmetic: % and **, online

Six activities your students do on their own devices. See who's finished, and their scores.

More Arithmetic: % and ** in one minute

What students need to know

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.

Mistakes students make

  • Use %, not the word mod, for the remainder operator.
  • JavaScript uses ** for exponents, not ^.
  • Remainder uses %, not //, in JavaScript.
  • Exponents use **, not the word pow, in JavaScript.
PREVIOUS · MODULE 5Basic Arithmetic
YOU ARE HERE · MODULE 6More Arithmetic: % and **
NEXT · MODULE 7String Concatenation

Discover other journeys with this module

What students will learn in this module

Every question in Module 6

Quick questions

  1. Does % return the remainder of a division?ANoBYes
  2. Does ** raise a number to a power?AYesBNo
  3. Is ^ used for exponents in JavaScript?ANoBYes
  4. Can % be used to check if a number is even?AYesBNo
  5. Is 'mod' a valid JavaScript operator for remainder?AYesBNo

Key terms

Students type the meaning of:

  • %

Match the pairs

10 % 3Match it to what it does
2 ** 4Match it to what it does
Checks if a number divides evenly with no remainderMatch it to what it does
Multiplies a number by itself repeatedlyMatch it to what it does
console.log(10 mod 3);Match it to what it does
console.log(2 ^ 4);Match it to what it does

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

Aconsole.log(10 mod 3);Bconsole.log(10 % 3);Cconsole.log(2 ** 4);

Question 2

Aconsole.log(2 ^ 4);Bconsole.log(2 ** 4);Cconsole.log(10 % 3);

Question 3

Alet r = 9 % 4;Blet s = 9 // 4;Clet p = 2 ** 3;

Question 4

Alet x = 5 % 2;Blet w = 5 pow 2;Clet z = 5 ** 2;

Question 5

Alet a = 8 % 3;Blet b = 8 ** 2;Clet c = 8 %% 3;