String valueOf() method

Find out all the information about the JavaScript valueOf() method of the string

Returns the string representation of the current String object:

const str = new String('Test')
str.valueOf() //'Test'

it's the same astoString().

Download mine for freeJavaScript beginner's manual


More js tutorials: