The number data type
A value written without quotes, whole (7), decimal (3.5) or negative (-2), that you can calculate with. 5 is a number but '5' in quotes is a string, which is text.
Understanding The number data type in ACARA Digital Technologies Years 7–8
What it does: 7 and 3 are numbers, so + adds them and gives 10. The quotes turn 5 into text, so this variable holds a string and not a number. Numbers can be calculated with, so 5 + 5 is 10. Joining two strings, like "5" + "5", gives "55". A whole number has no decimal point. 4.2 is a decimal number. Negative values like -2 are numbers too, as long as they are written without quotes.
Common mistakes: The letter x is not a multiplication operator in JavaScript. Numbers are multiplied with *, so the line should be let total = price * qty;. typeof is one word. Writing 'type of' with a space is a syntax error. It should be console.log(typeof total); which prints number.
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 562–580) and word search (Modules 522–580).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
numberFill in the Blanks
Spot the Error
Student with a class code? Join your class →