← TechnologyThe essentials of

Object.keys(): names of own enumerable properties

Publisher: ResumeMaker • 1 source

Published: 22 Oct 2026 13:13 · Updated: 22 Oct 2026 13:13

AI source check: 21 Oct 2026 12:40. This is not editorial approval.

In a few sentences

In brief

Inherited properties do not automatically enter the list.

Useful to know

Object.keys() returns an array of names of its own enumerable properties with string keys. In {name: "Ana", city: "Ruse"}, you get ["name", "city"]. This is a list of names, not values . [1]

It is suitable for a predefined object with settings. Do not use the number of keys as proof of a correct scheme: an object with two inappropriate fields also has a length 2. If the order of display is important for the product, set it explicitly, instead of relying on a randomly convenient arrangement of the input.

Sources

For further detail and to check the information:

  1. [1] MDN — Object.keys ↗