标签:JavaScript 原型链
function Fn(){
this.test1 = function(){
console.log(‘test1()‘);
};
}
Fn.prototype.test2 = function(){
console.log(‘test2()‘);
};
var fn = new Fn();
console.log(Fn.prototype instanceof Object)//true
console.log(Object.prototype instanceof Object)//false
console.log(Function.prototype instanceof Object)//true
console.log(Function.__proto__===Function.prototype)//true
console.log(Object.prototype.__proto__)//null
标签:JavaScript 原型链
原文地址:http://blog.51cto.com/ltzbk/2095318