Practice: Predict the Output
Read short DOM scripts and predict exactly what each console.log will print. Reading code is half of writing code — train your eyes before your fingers.
Read first, predict second
Before you write more DOM code, slow down and read some. Real engineers spend more time reading code (their own from a month ago, a teammate's, a library's) than writing fresh lines.
In this lesson you will see short DOM snippets. Your job: predict what console.log would print. No running the code — type your prediction into the blank that appears in the comment.
If you get it wrong, that is great information: the snippet is teaching you something about how textContent, value, attributes, and live element references actually behave.
Type your prediction exactly as it would appear in the browser console. Strings keep their original casing; numbers stay as numbers; null stays lowercase.