JS Coding Questions Logo
JS Coding Questions
#225💼 Interview💻 Code

What are the different ways to access object properties

Advertisement

728x90

There are 3 possible ways for accessing the property of an object.

1. Dot notation: It uses dot for accessing the properties

javascript
1objectName.property;

2. Square brackets notation: It uses square brackets for property access

javascript
1objectName["property"];

3. Expression notation: It uses expression in the square brackets

javascript
1objectName[expression];

Advertisement

Responsive Ad
🎯 Practice NowRelated Challenge

JavaScript Coding Exercise 55

Test your knowledge with this interactive coding challenge.

Start Coding

Advertisement

728x90
225of476
What are the different ways to access object properties | JSCodingQuestions.com