Object static methods
Object.values()
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
| Name | Type | Description |
|---|---|---|
| object | object or convertible primitive | Value 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(","));