Nearby lessons

6 of 40

🖥️ JavaScript with Google Chrome Console

📌 What is Chrome Console?

The Google Chrome Console is a powerful tool for debugging and logging output in JavaScript. It allows developers to inspect variables, run code snippets, and track performance.

These console methods help in development and debugging by displaying outputs in various formats.

🧩 Console Methods

AttributeDescription
console.log()📝 Logs general messages and values to the console.
console.table()📊 Displays array or object data in a table format.
console.error()❌ Displays error messages in red.
console.warn()⚠️ Shows warning messages with a yellow background.
console.time(label)⏱️ Starts a timer with a given label for measuring code execution time.
console.timeEnd(label)🛑 Stops the timer and prints the elapsed time for the label.
console.clear()🧹 Clears the console output.

🖥️ JavaScript Console Output

Example03
Code Cell
Loading Editor...
✏️ You can edit this code — click Run to refresh the preview.
Output

🧠 Test Your Knowledge

5 Questions
Progress: 0 / 5