Base CS from zero
Values and types: free-recall review
Recall beats re-reading. For each prompt, say or write a full answer from memory before you open the model answer — the effort of pulling it back is what makes the idea stick.
Reconstruct the unit’s spine without looking back: what a value is, what a type does, why the same bits decode differently, the everyday JS primitives, the null/undefined distinction, and why type systems exist at all.
- 01At the machine level, what exactly is a value, and where does its meaning come from?
- 02What is a type, and what two pieces of information does it supply?
- 03Show how one bit pattern produces different values under different types.
- 04Name the everyday JS/TS primitive types and the one fact about how numbers are stored.
- 05Distinguish null from undefined, and state what typeof null returns.
- 06Why do type systems exist, and how do static and dynamic checking differ?
If you could rebuild each answer from memory, you hold the unit’s spine: a value is raw bits, a type is the size-plus-interpretation rule that gives them meaning, the same bits decode to different values under different rules, JS exposes a handful of primitives (with every number a 64-bit IEEE 754 double and null/undefined as two distinct absences), and a type system exists to catch the wrong rule being applied — early at compile time, or late at run time.