Accessing object properties

Use the dot (.) operator to access the value of a property in an object. The name of the object goes on the left side of the dot, and the name of the property goes on the right side. For example, in the following statement, myObject is the object and name is the property:

myObject.name

To assign a value to a property in normal mode:

To change the value of a property:

You can also use the array access operator ([]) to access the properties of an object. See Dot and array access operators.