Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <h1>JavaScript Objects</h1> <h2>Creating an Object</h2> <p id="demo"></p> <script> // Create an Object: const car = {type:"Fiat", model:"500", color:"white"}; // Display Data from the Object: document.getElementById("demo").innerHTML = "The car type is " + car.type; </script> </body> </html>