the content is too long, How to display the complete content in console.log()?

Viewed 357

I have a big array, it has many element,
I need to display it in console,
I use console.log() but only a part of it was displayed.

How to display full content?

enter image description here

4 Answers

Run it through JSON.stringify so you are logging a single string and not a complex data structure.

For larger arrays, this works nicely:

myLargeArray.forEach( element => console.log( JSON.stringify( element ) ) );
Related