Lesson content
Read, practise, then check your understanding
JavaScript primitives are string, number, bigint, boolean, symbol, undefined, and null. Everything else is an object. Variables hold values without a fixed declared type.
Bindings
const course = "JavaScript";
let completed = 0;
completed += 1;
const settings = { theme: "dark" };
settings.theme = "light"; // object mutates; binding does not
Prefer const, then let when reassignment is required. var is function-scoped, hoisted, and redeclarable, so it is mostly legacy. typeof null is historically "object"; use value === null. Number.isNaN checks NaN without coercion. Learn truthiness but do not let implicit conversion obscure contracts. Objects compare by identity, while primitives compare by value.
Knowledge check
Answer every question correctly to complete this chapter.
0 of 10 checks passed
Your progress is saved on this device.