JavaScript Console Methods

Beginner
6 min read
Updated: Nov 2026
14 methods
Method index

About This Index

This page is the JavaScript Console Methods index for the tutorial track. Each row names a console method and what that call prints or measures.

Learn what the console is on /js/console. Use this page when you need a specific call such as console.log(), console.table(), or console.time().

Beginner path.

Start with log(), warn(), and error(). Then look up assert(), table(), group(), and time().

How to Call a Console Method

Every method in this index is called on console:

JavaScript
const rows = [
  { name: "Ada", score: 80 },
  { name: "Lin", score: 91 }
];

console.log(rows[0].name);   // "Ada"
console.warn("Retrying");
console.table(rows);
console.time("load");
console.timeEnd("load");

JavaScript Console Methods Table

All console methods in this JavaScript tutorial series (14 methods).

Logging

4 methods

Print a value, a note, a warning, or an error while you learn a JavaScript program.

MethodDescriptionTutorial
console.log()Prints a message or value. The usual first call in a JavaScript tutorial.Open
console.info()Prints an informational message. In many browsers it looks like log() with an info icon.Open
console.warn()Prints a warning. DevTools usually shows it in yellow so it stands out from normal logs.Open
console.error()Prints an error message, often in red, with a stack trace when you pass an Error.Open

Checks and traces

4 methods

Confirm a condition, reset the panel, count calls, and see the call stack.

MethodDescriptionTutorial
console.assert()Prints a message only when the condition is false. A true condition stays quiet.Open
console.clear()Clears the visible console messages so the next run starts on a clean panel.Open
console.count()Counts how many times a label has been logged. Pair it with countReset() to start over.Open
console.trace()Prints a stack trace from the line where you called it, so you can see who called the function.Open

Groups and tables

4 methods

Nest related log lines, or print a list of records as a table.

MethodDescriptionTutorial
console.group()Opens an expanded group so the next log lines nest under one heading.Open
console.groupCollapsed()Opens a collapsed group. In DevTools you expand it when you want the details.Open
console.groupEnd()Closes the group most recently opened with group() or groupCollapsed().Open
console.table()Prints an array or an array of objects as a table with columns.Open

Timers

2 methods

Measure how long a block of JavaScript takes to run.

MethodDescriptionTutorial
console.time()Starts a named timer. Call timeEnd() with the same label to print the elapsed time.Open
console.timeEnd()Stops the timer from time() and prints how many milliseconds passed.Open

Frequently Asked Questions

Console methods are functions on the console object. console.log(), console.warn(), and console.error() print messages. console.table() prints rows, console.group() nests lines, and console.time() measures a block of code.
The Console page teaches what logging is, including that log() returns undefined. This Methods index lists every console method in the JavaScript tutorial so you can look up table(), group(), time(), and the rest.
Use the console object and a method name: console.log("Saved"), console.warn("Retrying"), console.table(rows). These calls print a message. They are not a substitute for return.
console.table(rows) when rows is an array of objects. console.log(rows) prints the array, and table() lays the same data out in columns.
If you are new, read JavaScript Console first. Then use this index for log(), warn(), error(), assert(), table(), and time().

Start with the Console lesson

See log(), warn(), and count() print real lines, then come back to this index.

JavaScript Console →

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

10 people found this page helpful