InterviewHubPRO
Section Overview
Q379

Question 379 of 521

Part 6: Async Internals, Memory, Microtasks & Web APIs (329 - 403)

73%
JavaScript Internals (521 Qs)•Part 6: Async Internals, Memory, Microtasks & Web APIs (329 - 403)

How do you display data in a tabular format using console object

The console.table() is used to display data in the console in a tabular format to visualize complex arrays or objects.

js
  const users = [
    { name: "John", id: 1, city: "Delhi" },
    { name: "Max", id: 2, city: "London" },
    { name: "Rod", id: 3, city: "Paris" },
  ];
  console.table(users);

The data visualized in a table format,

Screenshot
Not: Remember that console.table() is not supported in IE.