Use an object as the error message:
Press F12 on your keyboard to view the message in the console view.
<!DOCTYPE html> <html> <body> <script> var myObj = { firsname : "CSS", lastname : "HTML" }; console.error(myObj); </script>/*from w w w. jav a 2 s .c o m*/ </body> </html>