为什么Object.getOwnPropertyDescriptor({}, '__proto__')返回undefined?
是因为__proto__最初实际上不是用户土地财产吗?
小智 5
__proto__不是自己的财产。它是 的一个属性Object.prototype,它是一个内部实现的 getter 或 setter,用于获取和设置对象的原型 ( [[Prototype]])。
< Object.getOwnPropertyDescriptor(Object.prototype, '__proto__')
> Object {enumerable: false, configurable: true, get: function..., set: function...}
Run Code Online (Sandbox Code Playgroud)