DEV Community

loading...

Discussion on: 7 JavaScript Hacks for 2020

Collapse
jmau111 profile image
Julien Maury

Nice list and the coolest thing is that it's perfectly safe to use, it's not hacky !

For the console.log with template literals, I like to do the following instead :

console.log("I'm %s", hero.name);

🤓

But I'm kidding I know you are talking about the general use not console.log in particular.

Collapse
_patrickgod profile image
Patrick God Author

Hey Julien,

Thank you. And thank you for the other way of using console.log(). You can even colorize the console with console.log(). It's crazy what you can do nowadays. :D

Take care,
Patrick

Collapse
ayekpleclemence profile image
Ayekple Clemence

In article the Styling Console Messages I used

console.log('%cStyling Console Messages', 'color:green; background:#33eeaa; font-size:25px;')

Styling console message is makes debugging easier.

Forem Open with the Forem app