Possible Duplicate:
What’s the difference between console.dir and console.log?
I have recently learnt the existence of console.dir()
.
After looking through MDN, I did not clearly understand what is the real difference between this and console.log
. They both show the same output (but .dir
shows some properties), is that it?
Which function should I use when debugging/developping?
EDIT: I just found out an existing question which answers my thoughts: What's the difference between console.dir and console.log?