Saturday, April 27, 2019

Chrome/Firefox console.table()

Console.table() - Web APIs | MDN

// an array of arrays

var people = [["John", "Smith"], ["Jane", "Doe"], ["Emily", "Jones"]]
console.table(people);
Table displaying array of arrays

Console API Reference  |  Tools for Web Developers  |  Google Developers

console.table([
  {
    first: 'RenĂ©',
    last: 'Magritte',
  },
  {
    first: 'Chaim',
    last: 'Soutine',
    birthday: '18930113',
  },
  {
    first: 'Henri',
    last: 'Matisse',
  }
])
The result of the console.table() example above.
Console Overview  |  Tools for Web Developers  |  Google Developers

No comments: