Returns the string representation of the current String object:

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

Same as toString().

Download my free JavaScript Beginner's Handbook and check out my JavaScript Course!


Follow me on Twitter @flaviocopes