Categories
JavaScript Answers

How to dump object with JavaScript?

Spread the love

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.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *