DEV Community

Discussion on: There's more than just console.log()....other useful ways to use the console in javascript

Collapse
 
matthewpardini profile image
Matthew Pardini • Edited

I love using css colors and sizing in my logging when I have a lot of noise. console.log(“%cMy Message”, color: “red”) will print a red colored My Message.

Thanks for the tips

Collapse
 
developer_buddy profile image
Buddy Agyin 🦁

This is something I actually didn't know was possible, thanks for that tip. I'll actually update the post to include this as well

Collapse
 
matthewpardini profile image
Matthew Pardini

Looks like I forgot my quotation marks around the color:red part. Check out facebook’s console sometime. It’s decked out (or at least it used to be, I don’t have fb anymore)