本文共 1095 字,大约阅读时间需要 3 分钟。
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
转载于:https://blog.51cto.com/ltzbk/2095318