- Instant help with your JavaScript coding problems
values
The Object.values() method returns an array of a given object's own enumerable property values, in the same order as that provided by a for...in loop.
JavaScript:
Object.values(obj)
TypeScript:
values(o: { [s: string]: T } | ArrayLike): T[];
Examples:
const arrayLikeObj1 = { 0: 'a', 1: 'b', 2: 'c' };
console.log(Object.values(arrayLikeObj1 )); // ['a', 'b', 'c']

Related snippets