JS Coding Questions Logo
JS Coding Questions
#375💼 Interview💻 Code

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

Advertisement

728x90

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

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

The data visualized in a table format,

Screenshot

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

Advertisement

Responsive Ad
🎯 Practice NowRelated Challenge

JavaScript Coding Exercise 33

Test your knowledge with this interactive coding challenge.

Start Coding

Advertisement

728x90
375of476
How do you display data in a tabular format using console object | JSCodingQuestions.com