根据w3school Every JavaScript object has a prototype. The prototype is also an object.
但是让我们来研究一下:
var SomeObject = { name: "foo" }
SomeObject.prototype // Undefined although its an object
我知道__proto__
它有
function SomeFunction () {
}
SomeFunction.prototype // object
但是
var SomeOtherObject = new SomeFunction()
SomOtherObject.prototype // undefined but its is an object
这与w3school声明Every JavaScript object has a prototype. The prototype is also an object
知道为什么吗?