The Object values() method

Find out all about the JavaScript values() method of the Object object

This method returns an array containing all the object own property values.

Usage:

const person = { name: 'Fred', age: 87 }
Object.values(person) // ['Fred', 87]

Object.values() also works with arrays:

const people = ['Fred', 'Tony']
Object.values(people) // ['Fred', 'Tony']

Download my free JavaScript Beginner's Handbook and check out my JavaScript Masterclass!

⭐️ install javascript into your brain with the JavaScript Masterclass. -29 days ⭐️