DEV Community

Discussion on: The trick to making console.log play nice with complex objects

tracygjg profile image
TGJ Gilmore • Edited on

Using JSON.stringify is useful in most cases but has limitations. There are some data types that JSON does not support well such as Dates. In complicated scenarios there is also a risk the object could contain a circular reference. I.e. a reference to a child object within the parent.
Reference MDN for more details on the Console API.