Object static methods

Object.values()

Try the free JavaScript compiler

Returns enumerable own string-keyed property values in the corresponding key order. Reading a getter can execute code. Null and undefined throw TypeError.

Formal Syntax & Structure

javascript syntaxjavascript
Object.values(object)

Parameters & Attributes

NameTypeDescription
objectobject or convertible primitiveValue to enumerate.

Return Value

Array of values

New array of the described fields.

Working Example

Example Snippetjavascript
console.log(Object.values({a:1,b:2}).join(","));
JavaScript Reference