Object valueOf() method

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

Called on an object instance to return its original value.

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

This is usually only used internally by JavaScript and is rarely actually called in user code.

Download mine for freeJavaScript beginner's manual


More js tutorials: