Wednesday, August 10, 2022

Javascript using Console - Facts you might have missed while debugging

 The shortcut to open console window in the browser : Ctrl + Shift + I

You might have used console.log("log here") many times but there are other methods of console object which we might be omitting and could be very beneficial time to time. Here are the others:


1. console.error()

2. console.dir()

console.table()


console.group() & console.groupEnd()


console.time() & console.timeEnd()


console.clear()


Outstanding Tips:
Use console.log("%cTEXT", "color: purple; text-size: 20px")


No comments: