Upon traversing the prototype chain, one would expect to find Object.prototype
at the bottom (or top?), leading to the assumption that they would function like typical objects. However, when using Object.getOwnPropertyDescriptors
, the properties obtained do not match those visible when inspecting the object through console.dir
. How can this discrepancy exist?
for (let property of Object.keys(Object.getOwnPropertyDescriptors(document))) {
console.log(property)
}