Re:Use console.log() like a pro (2020)
by josephg on Monday April 12, 2021 @05:03PM
(#26785166)
You can console.log(JSON.stringify(x, null, 2)) to pretty-print the object as JSON. It doesn’t look as good, but it’ll expand and show you the value as it was the moment you logged it. (As opposed to the value when you open it in dev tools)
[ Parent
| on HN ]
There are no comments on this comment yet.