Hacker News new | past | comments | ask | show | jobs | submit login

My dumb dead-simple trick that you've probably independently invented yourself: when I want to log variables x,y,z I write

console.log({x,y,z})

not

console.log(x,y,z)

Who needs pretty-printing, formatting libraries, string interpolation etc?




Yep, I have "invented" this myself as well :)


And the old version with json.stringify


Same here.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: