Way2tutorial Snippet Editor
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>JavaScript new Operator</title> </head> <body> <script type="text/javascript"> // Press F12 - View result on Console Panel var myObj = new Object(); // or you can write: var myObj = new Object; myObj.name = "Opal Kole"; myObj.address = "63 street Ct."; myObj.age = 48; myObj.married = true; console.log(myObj); // Object {name: "Opal Kole", address: "63 street Ct.", age: 48, married: true} </script> </body> </html>