When String() is called as a function rather than a constructor, it performs a type conversion.
The internal ToString conversion facilities are used for type conversion with the additional handling of a missing argument provided by the constructor itself.
|No argument||An empty string " "|
|Boolean||If the argument is true, then the result is "true" otherwise the result is "false"|
|Number||Special cases are provided for NaN and Infinity where "NaN" and "Infinity" will be returned. Otherwise the string is a textual representation of the value.|
|String||No conversion, the input value is returned unchanged.|
|Object||An internal conversion to a primitive takes place followed by a conversion from that primitive to a string. Some objects will return a string value that is immediately useful.|
The result of calling this function is a string version of the value passed in. If there is no value passed in argument an empty string is returned.
Converting numbers to strings can yield some strange effects due to rounding errors. Taking a numeric value and simply converting it is fairly reliable. However, the result of a numeric expression, being cast to a string directly rather than to a number variable and thence to a string, seems to expose some weaknesses in the arithmetic in some implementations.
ECMA 262 edition 2 - section - 126.96.36.199
ECMA 262 edition 2 - section - 15.5.1
ECMA 262 edition 3 - section - 15.5.1