Property name (Definition)

The name of an object property.

Availability:

ECMAScript edition - 2
JavaScript - 1.0
JScript - 1.0
Internet Explorer - 3.02
Netscape - 2.0

Accessing properties of an object by name simply requires the name to be added to the object reference with a dot separator between them.

However, the properties in an object are also kept in an array. You can access items in an array by index number. However, the objects are really accessed by name and so item 4 is really accessed as item "4". You can use the property names as symbolic names for an array index.

Now, assuming that we had deduced that the property we were interested in was stored in item 4 of the property array and had the name property4 as well, all of these would access the same property:

See also:Array index delimiter ([ ]), Property

Cross-references:

ECMA 262 edition 2 - section - 8.6.1

ECMA 262 edition 3 - section - 8.6.1

Wrox Instant JavaScript - page - 32