in JavaScript by
Q:
How can you read properties of an Object in JavaScript?

1 Answer

0 votes
by
You can write and read properties of an object using the dot notation as follows −

// Getting object properties

emp.name  // ==> Zara

emp.age   // ==> 10

// Setting object properties

emp.name = "Daisy"  // <== Daisy

emp.age  =  20      // <== 20
Click here to read more about JavaScript
Click here to read more about Insurance

Related questions

0 votes
asked Oct 19, 2019 in JavaScript by SakshiSharma
+1 vote
asked Jul 16, 2019 in JavaScript by Indian
+1 vote
asked Dec 4, 2019 in JavaScript by SakshiSharma
0 votes
asked Aug 24, 2020 in JavaScript by Hodge
+1 vote
asked Dec 4, 2019 in JavaScript by SakshiSharma
...