Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Accessing Object Property Values in Older Versions of JavaScript</title> </head> <body> <script> // ES5 syntax var person = {name: "Peter", age: 28}; var name = person.name; var age = person.age; document.write(name); // Peter document.write("<br>"); document.write(age); // 28 </script> </body> </html>