Messages in the console
Each console call prints one line. Warnings and errors are coloured, like in DevTools.
All you need is a browser and a text editor; the browser's DevTools let you inspect any page, see errors and try changes live.
Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.
Ready for more? This phase has 3 hands-on exercises with automatic checks.
Practice questions
Write the code in the editor, run it, then open the model answer to compare.
In the console example, print the result of 10 * 12 with a label, so the console shows 10 * 12 = 120.
Add a line that prints how many characters are in your name, using "YourName".length.
Explain it without notes
What are the Elements, Console and Network panels of DevTools for?
Why do changes you make in DevTools disappear when you reload?
Preview
Console
Nothing logged yet.Expected console output
Hello from JavaScript!
2 + 3 = 5
This is a warning
This is an error message