Sometimes, we want to dump object with JavaScript.
In this article, we’ll look at how to dump object with JavaScript.
How to dump object with JavaScript?
To dump object with JavaScript, we can use the console.log method.
For instance, we write
console.log("my object: %o", myObj);
to call console.log with a string with the '%o' placeholder and the myObj object to dump the content of the myObj object onto the console.
Conclusion
To dump object with JavaScript, we can use the console.log method.