Console Methods

26 February 2022

Console Log

console.log("Logged message");
// => Logged message

Console Time

console.time("Timer");

for (var i = 0; i < 10000; i++) {
  // Functionality to time
}

console.timeEnd("Timer");

// => Timer: 0.65087890625 ms

Console Table

console.table(object);

The method console.table() presents arrays and objects in a table UI, with an index column where applicable.

Console Dir

console.dir(object);

The method console.dir() presents all the properties of an object in a hierarchical listing, with a nested UI for child objects.