Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Let me save someone a few minutes of confusion: generally I use console.table instead of console.dir ever since I discovered console.dir is basically unpredictable. Try using it on an Error or anything that inherits from Error and you'll see it puts out what looks like an expandable stack trace. I have no idea how or why it's implemented to do that, but basically it just varies from one object to the next and I dislike that.


Thank you for this




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

Search: