String.prototype.valueOfbeginnerconst str = 'Hello'
str.valueOf() // β 'Hello'
new String('hi').valueOf() // β 'hi'Use valueOf() to return the primitive string value, useful when working with String wrapper objects.
For strings, valueOf() and toString() return the same value.
Challenge: Implement valueOfEqualsToString(str) that checks if they are equal.
valueOfEqualsToString('hello') // β true