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> <p>JavaScript uses names to access object properties.</p> <p id="demo"></p> <script> const person = {firstName:"John", lastName:"Doe", age:46}; document.getElementById("demo").innerHTML = person.firstName; </script> </body> </html>