You can style your console output using CSS or output SVG similar to HTML.
We need to leverage the power of %c, much like this:
Similar to sprintf
in PHP, %c
will be replaced with the substitute and display: inline
will be applied to it.
It doesn’t matter whether you use console.log
or console.info
in this case.
For more info, visit this post Console Delight.