Basic Data Types, online

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

Basic Data Types in one minute

What students need to know

42 is a number, written without quotes. false is the other possible boolean value.

Text wrapped in quotes is a string. Booleans must be lowercase: true or false.

Mistakes students make

  • String values need quotes around them, like "Sam".
  • Booleans use lowercase true/false, not True.
  • String values need quotes around them, like "Perth".
  • Booleans use lowercase true/false, not False.

Discover other journeys with this module

What students will learn in this module

Every question in Module 4

Quick questions

  1. Does "Sam" represent a string data type?AYesBNo
  2. Is 42 a number data type?ANoBYes
  3. Is True (capital T) valid JavaScript boolean syntax?ANoBYes
  4. Does removing quotes from text turn it into a variable reference?ANoBYes
  5. Can a number data type include decimals like 9.99?AYesBNo

Key terms

Students type the meaning of:

  • string

Match the pairs

"hello"Match it to what it does
trueMatch it to what it does
A data type for whole or decimal numbersMatch it to what it does
A data type with two possible values: true or falseMatch it to what it does
let name = Sam;Match it to what it does
let flag = True;Match it to what it does

Fill in the blanks

  1. let age = __;

    Hint: Type a number value for age.

  2. let isReady = _____;

    Hint: Type the boolean value meaning not true.

  3. let price = ____;

    Hint: Type a decimal number value for price.

  4. let isDone = ____;

    Hint: Type the boolean value meaning true.

  5. let temp = __;

    Hint: Type a negative number value for temp.

Spot the error

Question 1

Alet name = Sam;Blet age = 12;Clet ready = true;

Question 2

Alet flag = True;Blet count = 5;Clet word = "Hi";

Question 3

Alet age = 25;Blet city = Perth;Clet active = false;

Question 4

Alet score = 10;Blet done = False;Clet title = "Hi";

Question 5

Alet count = 3;Blet name = "Ana";Clet flag = yes;