Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The most important part of an object are its properties. The sections that follow explain them in detail.
To obtain the value of a property, you can use the dot
(.) or square bracket ([]) operators described
in Property Access. The left-hand side should be an
expression whose value is an object. If using the dot operator, the right-hand must be a simple identifier
that names the property. If using square brackets, the value within the
brackets must be an expression that evaluates to a string (or number)
that contains the desired property name:
// Get the "author" property of the book. var author = book.author; // Get the "surname" property of the author. var name = author.surname // Get the "main title" property of the book. var title = book["main title"]