LOGBOOK

HELP

Quiz Entry - updated: 2026.06.20

How do you debug JavaScript using the browser console?

You print values with console.log(...), which appear in the Console tab of the browser's developer tools (opened with F12).

The simplest way to see what your code is doing is to make it tell you. console.log() writes whatever you pass it to the browser's developer console — an invisible-by-default panel where script output and errors show up:

console.log("Das Ergebnis: " + "Hello" + " " + "World");
// Output: Das Ergebnis: Hello World

To see this output:

  • Press F12 to open the browser's developer tools.
  • Click the Console tab.

console.log isn't the only method. Others make output stand out or display data nicely:

  • console.error() — prints an error message (usually red)
  • console.warn() — prints a warning (usually yellow)
  • console.table() — shows an array or object as a readable table

Sprinkling console.log calls through your code to check variable values and trace the flow of execution is the everyday, no-setup-required way to debug — and the console doubles as a scratchpad where you can type and test snippets live.

From Quiz: WEBT / Introduction to JavaScript | Updated: Jun 20, 2026