Object's properties
A property is a value assigned to the object, which can be accessed by a name.
Properties can be assigned to any object.
The syntax to set property to the given object
The syntax to read property from the object, similarly, is:
It is allowed to access properties by giving the name in the string value,
by putting it inside brackets
For example:
which is equivalent to
Property of any name may be assigned to the given object, including the language keywords.
It is not possible to specify the data type of any property.
Properties in class
Properties of an object can be also set directly in its class definition.
Example:
Properties declared in class definition are assigned to object during object's creation,
and after that, they can be freely changed or removed.
For more about classes see Classes.
Set of properties
Properties can be managed by special syntax
which is an object that represents a set of properties assigned to the given object
There are three methods accepted by the object of the set of properties:
Examples:
Properties of system objects and external objects
Properties can be assigned to any object, even to system objects (ie:
In case of external objects (objects that exists in different execution environment), it is not allowed
to access their properties,
and any access will throw an exception.