Siebel eScript Language Reference > Siebel eScript Commands > Global Objects >
undefine() Method
This function undefines a variable, Object property, or value. Syntax
undefine(value)
|
|
value |
The variable or object property to be undefined |
Usage
If a value was previously defined so that its use with the defined() method returns true, then after using undefine() with the value, defined() returns false. Undefining a value is not the same as setting a value to null. In the following fragment, the variable n is defined with the number value of 2, and then undefined. var n = 2; undefine(n);
CAUTION: The undefine() function is unique to Siebel eScript. Before using it, confirm that the JavaScript interpreter that will run the script supports Siebel eScript functions. Avoid using this function in a script that may be used with a JavaScript interpreter that does not support it.
Example
In the following fragment an object o is created, and a property o.one is defined. The property is then undefined, but the object o remains defined. var o = new Object; o.one = 1; undefine(o.one);
|