Difference between console.dir and console.log in javascript?

JavascriptFront End TechnologyObject Oriented Programming

The console method log() displays the toString representation of any object passed to it.

The Console method dir() displays an interactive list of the properties of the specified JavaScript object. The output is presented as a hierarchical listing with disclosure triangles that let you see the contents of child objects.

Published on 27-Nov-2019 12:15:24