console.log( message )
Parameters: This method accepts a single parameter which can be an array, an object or any message.
Return value: This method returns the value of the given parameter.
console.dir() Method: The console.dir() method is used to get the list of object properties of a specified object. These object properties also have child objects, from which you can inspect for further information.
console.dir( object )
Parameters: This method accepts single parameter which holds the object element.
Note: The output of console.log() method is similar to HTML-like result while the output of console.dir() method is similar to JSON-like tree.
- Difference between node.js require and ES6 import and export
- Difference Between DOS and Windows
- Difference Between Apache Kafka and Apache Flume
- Difference Between HTML and ASP
- Difference between ASP and ASP.NET
- Difference between Preemptive Priority based and Non-preemptive Priority based CPU scheduling algorithms
- What is the Difference between Website and Web Portal
- Difference between Web Scraping and Web Crawling
- Difference between try-catch and if-else statements in PHP
- Difference between Algorithm, Pseudocode and Program
- Difference between Dropbox and OneDrive
- Difference between Applets and Servlets
- Difference between fundamental data types and derived data types
- Difference between Deterministic and Non-deterministic Algorithms
- Difference between HTML and HTML5
- What is the difference between parseInt() and Number()?
- Difference between Indirect and Implied Addressing Modes
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.