The Reflect.ownKeys() method returns an array whose values represent the keys of the properties of a provided object. It ignores the inherited properties.
Here is the example code to demonstrate this method:
var obj = { a: 1, b: 2, __proto__: { c: 3 } }; var keys = Reflect.ownKeys(obj); console.log(keys.length); //Output "2" console.log(keys[0]); //Output "a" console.log(keys[1]); //Output "b"