rauschma / exploring-js

20 stars 0 forks source link

Chapter: Printing information on the console (`console.*`) #48

Open rauschma opened 5 years ago

allan-bonadio commented 2 years ago

You left out a few details. I can't find this info anywhere anymore, template strings have taaken over. %j - i think it only works in Node %o and %O - only in the browser (one of them prints dom nodes can't remember) %i or %d - print as integer %f - print as float %c - string argument is CSS to be applied to string from here to end of string or next %c - very cool! Implimentation varies from one browser to next. Change font, add rounded borders in color! there is a limit of course.