Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
laurent123456
on April 12, 2021
|
parent
|
context
|
favorite
| on:
Use console.log() like a pro (2020)
Please don't add colours to your console.log statements. It might look nice in the Chrome console, but as soon as your messages end up elsewhere, in a terminal or text file for instance, it makes the statements look very messy.
IggleSniggle
on April 12, 2021
[–]
I love adding colors to my logs whether they are bash or nodejs, but I generally check if the context is tty or not before applying colors.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: