JS - Console

aigle-levant · September 2, 2024

One of the first things we learn in JS is the console…

Console

Console is an object that provides you access to a browser’s debugging console.

We can access this object using console or window.console

Console commands

console.clear() -> Clears the console screen console.error() -> Displays error message in console output console.time() -> Calculates time taken by the program; can be stopped by console.timeEnd() console.log() -> Writes message to the console output console.table() -> Displays an array as a table in console output