Basic Data Types, online
Six activities your students do on their own devices. See who's finished, and their scores.
Learning
Understanding
Testing
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.
PREVIOUS · MODULE 3Variables: let, const, var
YOU ARE HERE · MODULE 4Basic Data Types
NEXT · MODULE 5Basic Arithmetic
What students will learn in this module
Every question in Module 4
Quick questions
- Does "Sam" represent a string data type?AYesBNo
- Is 42 a number data type?ANoBYes
- Is True (capital T) valid JavaScript boolean syntax?ANoBYes
- Does removing quotes from text turn it into a variable reference?ANoBYes
- 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 doestrueMatch it to what it doesA data type for whole or decimal numbersMatch it to what it doesA data type with two possible values: true or falseMatch it to what it doeslet name = Sam;Match it to what it doeslet flag = True;Match it to what it doesFill in the blanks
let age = __;
Hint: Type a number value for age.
let isReady = _____;
Hint: Type the boolean value meaning not true.
let price = ____;
Hint: Type a decimal number value for price.
let isDone = ____;
Hint: Type the boolean value meaning true.
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;
