Open
Description
There's a paragraph related to the in operator that goes like this :
There's (currently) no built-in way to get a list of all properties which is equivalent to what the in operator test would consult (traversing all properties on the entire [[Prototype]] chain, as explained in Chapter 5). You could approximate such a utility by recursively traversing the [[Prototype]] chain of an object, and for each level, capturing the list from Object.keys(..) -- only enumerable properties.
Why do we need to capture only the enumerable properties. The in operator also checks for non-enumerable properties as well. So instead of using Object.keys(), shouldn't we use Object.getOwnPropertyNames() to build the utility?