Accessing Object Properties in Javascript


Access properties of an object using dot notation or bracket notation.

Source Code

console.log(person.name); // Dot notation
console.log(person['age']); // Bracket notation
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments