JavaScript valueOf() Method: String Object
Description
The valueOf() method is used to get the primitive value of a string object.
Version
Implemented in JavaScript 1.1
Syntax
valueOf()
Parameter
None
Example:
In the following web document valueOf() method returns the value of a string object.
View the example in the browser
Supported Browser
Internet Explorer 7 | Firefox 3.6 | Google Chrome 7 | Safari 5.0.1 | Opera 10 |
Yes | Yes | Yes | Yes | Yes |
See also:
JavaScript Core objects, methods, properties.
Previous: JavaScript toUpperCase() Method : String Object
Next:
Javascript : Java object, JavaArray, JavaClass, JavaObject, JavaPackage, Packages, sun, netscape
Test your Programming skills with w3resource's quiz.
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics