What does `Object.values({a:1, b:2, c:3})` return?

JavaScript Professional Easy

JavaScript Professional — Easy

What does `Object.values({a:1, b:2, c:3})` return?

Key points

  • `Object.values()` returns an array of values from an object.
  • The values are in the same order as the properties.
  • It does not return the keys or a nested array.
  • Useful for accessing object values without knowing the keys.

Ready to go further?

Related questions