Style your JS console logs
Why might you want to style your logs? Well it could be an innocent reason like Facebook (go have a look) or many companies who put a message there to try to drum up some recruitment leads for their development team...
It could also be cos you're a dick that wants some extra developer points. Like me 👀.
When writing your console log, your first argument (which is usually just the text/variable you want to output) needs to contain "
%c". For example:
console.log("%c Hello world!").
The second argument, must be the CSS you want to use to stye your log. For example:
console.log("%c Hello world!", "color: red;")
You can keep adding to that so that different parts of your log have different styling but using more than one
%c and more than one styling parameter.
console.log("%cText1 %cText2", "styles for text1", "styles for text2")