We are still cooking the magic in the way!
Problem
Debugging arrays of objects with console.log() produces hard-to-read nested output that requires expanding each item.
Solution
Use console.table() to display arrays and objects in a clean, sortable table format in your browser DevTools.
Benefit
Instantly see all data in a structured table — sortable by column, easy to scan, no expanding needed.
Code Example
const users = [
{ name: 'Ahmed', age: 25, role: 'admin' },
{ name: 'Sara', age: 30, role: 'editor' },
{ name: 'Khalid', age: 28, role: 'user' },
];
// Instead of:
console.log(users); // Nested, hard to read
// Use:
console.table(users);
// Shows a beautiful table with columns: name, age, role