Online HTML Editor
Javascript Online Compiler
index.html
Change Theme
Compress code
Uncompress code
Download Code
Clear Code
Copy Code!
RunĀ
Click to run or ctrl+s
Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Javascript - console dir</title> </head> <body> <h1>console.dir is used to print out the properties of an object</h1> <div id="parent"> <div id="child"> <p>Testing DOM Element</p> </div> </div> <p>Press <kbd>ctrl + shift + i</kbd> to see the console</p> <script> const arr = [1,2,3,4,5]; console.dir(arr); var parent = document.getElementById("parent"); console.dir(parent); console.dir(document.location); </script> </body> </html>
RunĀ