Skip to content
FLAVIO COPES
flaviocopes.com
2026

The Object values() method

By Flavio Copes

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.

~~~

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

Usage:

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

Object.values() also works with arrays:

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

Related posts about js: