Skip to main content
Version: 3.27.2

Reflect.ownKeys()

The static Reflect.ownKeys() method returns an array of the target object's own property keys.

Syntax

Reflect.ownKeys(target)

Parameters

  • target
    • : The target object from which to get the own keys.

Return value

An Array of the target object's own property keys.

Exceptions

A TypeError, if target is not an Object.

Description

The Reflect.ownKeys method returns an array of the target object's own property keys. Its return value is equivalent to Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target)).