The valueOf() method returns the primitive value of a String object.
The valueOf() method returns the primitive value of a String object.
string.valueOf()
None
A String, representing the primitive value of a string
Return the primitive value of a string object:
var str = "Hello World!"; var res = str.valueOf(); console.log(res);