«   Previous tip Next tip   »

Chrome DevTools: Better logging of objects and arrays with console.table

Last updated: 1st February 2019
Better logging of objects and arrays with console.table

The table method on the console object provides a tabular view of the data you pass to it. Try it out with the following:

var languages = [
    { name: "JavaScript", fileExtension: ".js" },
    { name: "TypeScript", fileExtension: ".ts" },
    { name: "CoffeeScript", fileExtension: ".coffee" }
];

console.table(languages);
«   Previous tip Next tip   »

Sign up to receive a developer tip, in the form of a gif, in your inbox each week