# The Object valueOf() method

> Learn how the JavaScript valueOf() method returns the primitive value of an object, a feature normally used internally by JavaScript and rarely by you.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2019-04-22 | Topics: [JavaScript](https://flaviocopes.com/tags/js/) | Canonical: https://flaviocopes.com/javascript-object-prototype-valueof/

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

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

This is normally only used internally by [JavaScript](https://flaviocopes.com/javascript/), and rarely actually invoked in user code.
