Property (Definition)

A property consists of a name, a value, and a set of attributes.


ECMAScript edition - 2

A property consists of a name, a value, and a set of attributes. It belongs to an object.

Since it belongs to an object, each instance of a particular object class can own its own private properties as well as inheriting shared properties from its prototype. Privately owned properties are sometimes called instance variables.

A property can have zero or more attributes. The attributes control how the property is accessed both internally from inside the interpreter and externally from your script.

A property is somewhat like a method, at least in the way it is described in a script. However, properties are containers whereas methods are actions. Properties can have values assigned to them or can have their values retrieved. A method will generally cause something within the receiving object to change. Properties are read only, write only, or read and write. Some properties are internal and private to the object and are not therefore exposed as scriptable items.

Methods are really references to function objects that can be called.

See also:Function, Global object, java.util, Method, Object, Property accessor, Property attribute, Property name, Property value


ECMA 262 edition 2 - section - 15.1

ECMA 262 edition 3 - section - 15.1