JS: Reflect.ownKeys

By Xah Lee. Date: . Last updated: .

New in ES2015.

Reflect.ownKeys ( obj )

Return a array of the object's keys. (including symbol keys and non-enumerable keys.)

[see JS: Symbol Tutorial]

[see JS: Property Attributes]

[see JS: List Properties]

console.log (
    Reflect.ownKeys ( {p1:1, p2:2} )
); // [ 'p1', 'p2' ]

Reference

ECMAScript® 2016 Language Specification#sec-reflect.ownkeys

back to JS: Reflect Object

Liket it? Put $5 at patreon.

Or, Buy JavaScript in Depth