valueOf (Object - JavaScript)
Gets the value of an object as a string.
Defined in
Object (JavaScript)Syntax
valueOf() : string
Return value | Description |
---|---|
string |
The string value of this object. |
Examples
This computed label displays the value of pi.var o = new Object(Math.PI);
o.valueOf()