# The Object values() method

> Learn how the JavaScript Object.values() method returns an array containing all the own property values of an object, and how it also works with arrays.

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

This method returns an array containing all the object own property values.

Usage:

```js
const person = { name: 'Fred', age: 87 }
Object.values(person) // ['Fred', 87]
```

`Object.values()` also works with arrays:

```js
const people = ['Fred', 'Tony']
Object.values(people) // ['Fred', 'Tony']
```
