Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> <p>Creating a JavaScript Object.</p> <p id="demo"></p> <script> var person = { firstName : "John", lastName : "Doe", age : 50, eyeColor : "blue" }; document.getElementById("demo").innerHTML = person.firstName + " " + person.lastName; </script> </body> <!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_object_object by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:24:35 GMT --> </html>
Result:
Try it Yourself - © w3schools.com