Advertisement
728x90
The console.dir() is used to display an interactive list of the properties of the specified JavaScript object as JSON.
javascript
1const user = { name: "John", id: 1, city: "Delhi" };
2
3console.dir(user);The user object displayed in JSON representation

Advertisement
Responsive Ad
🎯 Practice NowRelated Challenge
JavaScript Coding Exercise 31
Test your knowledge with this interactive coding challenge.
Start CodingAdvertisement
728x90
373of476