sudhakarinfotech
(current)
Run Code
Live Code Editor- Javascript Object Property Access Using Bracket Notations
Source Code
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>JavaScript Object Property Accessing</title> </head> <body> <h1>JavaScript Object Property Access Using Bracket Notation</h1> <p>Javascript Object property access using bracket notation.</p> <script type="text/javascript"> const person = { name: 'John', salary: 200000, }; // accessing property document.write(person["name"]); // John </script> </body> </html>
Source Code Output :
Running