+ 1
Google Chrome - JS | console.log and colors [tips]
Hi, I wanted to share this tips I didn't see before and after many years. That's a synthax to add CSS to your console.log() and to don't only get a black text ouput. Synthax: console.log( "%c" + myVar 1 + "%c" + myVar2, "color: darkblue; background: grey;", "color: #77000;", "another CSS", "etc..."); You can add as many style as you whish... Now I will spend more time to decorate my console that to code :S
1 Réponse
0
Great