Favorites

JavaScript Object.values() Method

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
Object.values()
JavaScript Object Static methodThis method is supported by all modern browsers.
Updated 28th November 2026

The Object.values() static method returns an array of an object's property values.

Description

The Object.values() static method returns an array of the object's own enumerable property values, in the same order as Object.keys(). It's convenient for totals and searches across an object's values.

Only own enumerable string-keyed properties are included, in the same order as Object.keys(). Getters are called, so their current values are returned. Primitives are converted to objects first, and null or undefined throw a TypeError.

For a Map, use its own values() method instead, which returns an iterator. If you need both keys and values, Object.entries() gives them together.

Syntax

Object.values(obj)

Parameters

  • objThe object to work with.

Return Value

An array of the object's own enumerable string-keyed property values.

Example

const scores = { sam: 8, alex: 12, lee: 5 };
console.log(Object.values(scores));
console.log(Object.values(scores).reduce((a, b) => a + b, 0));
console.log(Math.max(...Object.values(scores)));

Browser Support

The following information will show you the current browser support for the Object.values() method. Hover over a browser icon to see the version that first introduced support for this method.

This method is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee