Debugging with the Console
console.log, table, warn, error, group and time help you see what code does. Browser dev tools add breakpoints and a debugger statement pauses code.
Example
console.log("value", 42);
console.warn("careful");
console.table([{ a: 1 }, { a: 2 }]);
console.time("t"); for (let i = 0; i < 1e5; i++); console.timeEnd("t");
console.log(typeof console.assert);Exercise
Pause in dev tools.
;Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.