Module 01 · 35 min
Runtime, console and values
Observable outcome : Observe what the engine receives and produces.
Understand
JavaScript turns a file into instructions executed by an engine. Every runtime value has a type.
Reference points
- Runtime
- Environment that executes the program.
- Expression
- Code that produces a value.
- Serialization
- Turning a value into transportable text.
Predict before coding
What does typeof null return?
Write and test
Complete the function. Tests run locally in a bounded worker; no system command is executed.
Static criteria
- ✓
function - ·
typeof - ·
json - ·
return
Run only code you understand. The exercise uses a separate, short-lived Web Worker with a timeout; it is not a security sandbox for untrusted code.
The solution appears after your first check.
Diagnose an incident
The console displays an unexpected object.
Testable hypothesis
Reversible action
Executable test : The actual value remains the source of evidence.