The numeric equivalent of the string value is returned.
In the case of a String object, the valueOf() method returns the same thing as the toString() method.
This is proven by taking a string object and then using the == or === operators to compare the two values myString.toString() and myString.valueOf().
See also: | Cast operator, String.prototype, String.toString(), valueOf() |
Prev | Home | Next |
String.toUpperCase() | Up | String operator |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |