原型也是对象

console.log(Object.prototype);   // prototype 是指向原型的引用

console.log(typeof Object.prototype)   // object    原型也是对象

console.log(typeof {}.prototype)   // undefined  空对象{} 没有prototype对象,因为prototype是函数对象的一个属性,

                                                                          Array、Object都是函数,而不是对象或者类。

console.log(typeof Object)   //  function

猜你喜欢

转载自blog.csdn.net/yang295242361/article/details/83658247