Articles → JavaScript → Console.Dir() Method In Javascript
Console.Dir() Method In Javascript
Purpose
Syntax
console.dir(javascript_object)
Example
- Open chrome browser
- Go to google.com (you can open any website).
- Press F12. Console window appears
- Go to console tab. Write the following command and press enter.
console.dir(window.navigator)
Output