String.prototype.valueOf() Method is used to display value of a String object as a string data type.
Example
var str = new String();
-
str is String object. <typeof str> returns the object string.
-
str.valueOf() returns string datatype. <typeof str.valueOf()> returns the string datatype value.