umaruio / fe-interview-cheat-sheet

[Gitbook Repo] A collection of front-end interview questions.
https://interview-cheatsheet.umaru.io/
Creative Commons Attribution Share Alike 4.0 International
26 stars 5 forks source link

根原型对象的原型是 undefined? #2

Closed sushoucanyuan closed 7 years ago

sushoucanyuan commented 7 years ago

通过 Object.getPrototypeOf(Object.prototype) 得到的是 null

umarufans commented 7 years ago

返回 null 并不是因为根原型对象的原型是 null : image 不过确实表述不合理,Object.prototype.__proto__ 的确是 null,这个是用来表示该原型对象没有原型的。 感谢反馈~

umarufans commented 7 years ago

已更新:https://github.com/lcx960324/fe-interview-cheat-sheet/commit/a6bd852c9454108b8102f2c25dacd1c315229227 XD