JavaScript Console Methods - Complete
Reference Table
Method When to Use Purpose
Default debugging, variable inspection, General purpose logging for any type
[Link]()
general output of information
Non-critical status updates, flow Display informational messages with
[Link]()
indicators, informational messages info icon (blue ℹ️)
Deprecated features, potential issues, Display warning messages with
[Link]()
non-critical problems warning icon (yellow ⚠️)
Caught exceptions, critical failures, error Display error messages with error
[Link]()
conditions icon (red ❌)
Verbose debugging information, detailed Debug-level logging (often hidden by
[Link]()
tracing default in browsers)
Arrays of objects, tabular data, structured Display data in a formatted table for
[Link]()
datasets better readability
Deep object exploration, DOM elements, Interactive object tree view for
[Link]()
complex objects detailed inspection
DOM element hierarchy, XML/HTML Display XML/HTML elements in
[Link]()
structure inspection collapsible tree format
Clean development environment, reset Clear all console messages for a
[Link]()
console output fresh start
Start performance measurement, timing Begin a named timer for
[Link]()
operations performance monitoring
Complete performance measurement, End named timer and display
[Link]()
finish timing elapsed time
Intermediate timing checkpoints, multi- Log intermediate time without
[Link]()
step operations ending the timer
Track function calls, loop iterations, event Increment and display a named
[Link]()
occurrences counter
Reset specific counters, start counting
[Link]() Reset named counter back to zero
over
CPU profiling, performance analysis Start CPU profiler for detailed
[Link]()
(DevTools) performance analysis
End CPU profiler and make data
[Link]() Complete CPU profiling session
available in DevTools
Organize related logs, create collapsible Start an expandable group for
[Link]()
sections organizing console output
Start a collapsed group (minimized
[Link]() Organize logs but minimize visual noise
by default)
[Link]() Close current grouping context End the current console group
Page 1 of 2
Method When to Use Purpose
Runtime validation, conditional error Log error message only if condition
[Link]()
logging is false
Debug call hierarchy, execution flow Display complete stack trace from
[Link]()
analysis current execution point
Access memory usage information
[Link] Memory usage monitoring, leak detection
(browser-specific)
Mark specific points in timeline, event Add markers to browser's timeline
[Link]()
marking (DevTools)
Alternative error logging (deprecated in Legacy method for error logging (use
[Link]()
some browsers) [Link] instead)
Page 2 of 2