:: Home >>

setProperty

Assigns property value.

Syntax

obj.setProperty(name, value);

Parameters

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

Example

obj.defineProperty("color", "black");
obj.setProperty("color", "red"); // set the value of the 'color' property
obj.setColor("red"); // does the same thing

See also

defineProperty, getProperty 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