JavaScript: Reflect.ownKeys

By Xah Lee. Date: . Last updated: .

New in JS2015.

Reflect.ownKeys( obj )
Return a array of the object's keys. (including Symbol keys and non-enumerable keys.)

[see List Properties]

const obj = {
 "y": 3,
 [Symbol("x")] : 4,
};

// list all properties of a object
console.log( Reflect.ownKeys(obj) ); // prints [ 'y', Symbol(x) ]
JS in Depth
XAH  BUY NOW

JS in Depth

JS Obj Ref

DOM


JS Obj Ref

Reflect