Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Log JavaScript Object in Browser Console</title> <script> // Sample object var obj = {name: "John", age: 28, gender: "Male"}; // Printing object in console console.log(obj); </script> </head> <body> <p><strong>Note: </strong> Press Ctrl+Shift+J (Windows / Linux) or Cmd+Opt+J (Mac) to open Browser Console panel.</p> </body> </html>