:: Home >>

defineProperty

Creates get/set methods for the property.

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

No comments yet.
Comments will appear on this page and in the main forum.

Documentation:

Recent changes:

2.5.0 - 2.5.2
2.5.2
2.5, 2.5.1
2.5.1
2.5
Release History
2.5
2.0.2
textToValue
textToData