JavaScript Objects Object.values()

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!



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 loop (the difference being that a for-in loop enumerates properties in the prototype chain as well).

var obj = { 0: 'a', 1: 'b', 2: 'c' };
console.log(Object.values(obj)); // ['a', 'b', 'c']


For browser support, please refer to this link

Got any JavaScript Question?