Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
_qwfv
on April 12, 2021
|
parent
|
context
|
favorite
| on:
Use console.log() like a pro (2020)
Rather than using
%s, %i, %o, %f, etc.
You can use a templated string, like this:
`This is a string that has been printed ${someVar} times.`
vitus
on April 12, 2021
[–]
That works great for strings / numbers, not so much for objects (unless you really want to see "[object Object]" in your debug strings).
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: