Write an object to the console:
This example demonstrates how an object is displayed when using the console.assert method.
<!DOCTYPE html> <html> <body> <script> var myObj = { firsname : "CSS", lastname : "HTML" }; console.assert(document.getElementById("demo"), myObj); </script>//from w ww. j av a 2 s . c o m </body> </html>