1 // Access an object's properties
2 const person1 = {};
3 person1['firstname'] = 'Mario';
4 person1['lastname'] = 'Rossi';
5
6 console.log(person1.firstname);
7 // expected output: "Mario"
8
9 const person2 = {
10 firstname: 'John',
11 lastname: 'Doe'
12 };
13
14 console.log(person2['lastname']);
15 // expected output: "Doe"