What does `Object.keys()` return?

JavaScript Associate Easy

JavaScript Associate — Easy

What does `Object.keys()` return?

Key points

  • `Object.keys()` does not return values, only property names.
  • It specifically targets the object's own properties, not all properties including inherited ones.
  • This method is useful for iterating over an object's keys in JavaScript.

Ready to go further?

Related questions