The Object valueOf() method

🆕 🔜 Check this out if you dream of running a solo Internet business 🏖️

Find out all about the JavaScript valueOf() method of an object

Called on an object instance, returns the primitive value of it.

const person = { name: 'Fred' }
person.valueOf() //{ name: 'Fred' }

This is normally only used internally by JavaScript, and rarely actually invoked in user code.