标签:logs span 函数 struct tor color func fine obj
对象有 __proto__
函数有prototype
prototype 是对象, 所以有__proto__
var a1 = {a:1} var a2 = Object.create(a1); console.log(a2.prototype); //undefined console.log(a2.__proto__); //Object { a: 1 } console.log(a2.__proto__.__proto__); //Object { , 等 15 项… } console.log(a2.__proto__.__proto__.__proto__); //null console.log(‘‘); var b = function(){} console.log(b.prototype); //Object { , 等 1 项… } constructor:b() __proto__:Object console.log(b.prototype.prototype); //undefined console.log(b.prototype.__proto__); //Object { , 等 15 项… } console.log(b.__proto__.prototype); //undefined
标签:logs span 函数 struct tor color func fine obj
原文地址:http://www.cnblogs.com/Jiaojiawang/p/7398148.html