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, writable, enumerable, configurable]

[see JS: List Properties]

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


ECMAScript® 2016 Language Specification#sec-reflect.ownkeys

back to JS: Reflect

Liket it? Put $5 at patreon.

Or, Buy JavaScript in Depth

If you have a question, put $5 at patreon and message me.