对象有 __proto__
函数有 prototype
对象的__proto__指向构造自己的函数的prototype
但有一例外
var Obj = {v:99}var pObj = Object.create(Obj);console.log(pObj.__proto__ === Obj) // true
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3