:: Documentation >>

defineProperty

Creates get/set methods for the property.

null

Syntax

obj.defineProperty(name, value);

Parameters

name (string) - property name
value (any) - default value

Example

// create 'color' property with default value "black".
obj.defineProperty("color", "black");

See also

getProperty, setProperty methods

Comments

Documentation:

Recent changes:

2.6.4
2.6.3
2.6.2
2.6.1
2.6.1
2.6.0
2.5.0 - 2.5.6
2.5.6
2.5.0 - 2.5.5
2.5.5