JS: Reflect.ownKeys
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]
const obj = { "y": 3, [Symbol("x")] : 4, }; // list all properties of a object console.log( Reflect.ownKeys(obj) ); // prints [ 'y', Symbol(x) ]
Reference
ECMAScript® 2016 Language Specification#sec-reflect.ownkeys
back to JS: Reflect
If you have a question, put $5 at patreon and message me.