JavaScript console is more than console.log()

Grigor Khachatryan
May 6, 2019 · 3 min read
Image for post
Image for post
console.log('Where am I?');
const foo = { id: 1, height: '200px', width: '100px' };
const bar = { id: 2, height: '250px', width: '200px' };
Image for post
Image for post
Variable names are not visible
console.log({ foo, bar });

console.warn() & console.error()

Image for post
Image for post
console.error() and console.warn()

console.group()

Image for post
Image for post

console.table()

Image for post
Image for post
console.table()

console.trace()

console.time()

Image for post
Image for post
console.time()

console.clear()

console.dir()

Like to learn?

devgorilla

http://devgorilla.xyz

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store