myObject.valueOf() in ECMAScript 262

Returns the internal this value of the object.

Return Type
String

Description

For various intrinsic JS object types, this value returned is overridden and customized as follows:

Array
Same as the Array.toString() method.
Boolean
(unchanged) The true/false value itself.
Date
A Number object with an integer value representing the time in milliseconds since Midnight, January 1st, 1970 UTC.
Function
(unchanged) A reference to the function object itself.
Number
(unchanged) The number value itself.
Object
(unchanged) A reference to the object itself.
String
The string's value.