Level 1 · Foundations
Module 2: Variables, Values and Types
Variables with let and const
Declare variables with let and const, choose between them, reassign let variables safely and name variables so code explains itself.
Lesson 7
Strings and template literals
Create strings, join them with + and template literals, use common string properties and methods (length, toUpperCase, trim, includes, slice) and escape special characters.
Lesson 8
Numbers and mathematical operations
Calculate with numbers using arithmetic operators, Math methods and rounding; recognise floating-point surprises, NaN and Infinity; and format money with toFixed.
Lesson 9
Booleans, null and undefined
Use booleans, understand truthy and falsy values, and tell undefined (not assigned) from null (deliberately empty).
Lesson 10
Type conversion and type checking
Check types with typeof, convert explicitly with Number, String and Boolean, parse with parseInt and parseFloat, and predict implicit conversions.
Module mastery assessment
Eight questions and a practical task covering Lessons 6 to 10: variables, strings, template literals, numbers, booleans and type conversion.