原型链
本帖最后由 King丨小义 于 2022-10-2 10:00 编辑var obj = new Object();
function Fn(){}
fn = new Fn();
/**************/
console.log(Object.prototype.__proto__ === null);
console.log(Object.prototype === obj.__proto__);
console.log(Fn.prototype === fn.__proto__);
console.log(Fn.prototype.__proto__ === Object.prototype);
console.log(Function.prototype === Function.__proto__);
console.log(Fn.__proto__ === Function.prototype);
console.log(Object.__proto__ === Function.prototype);
console.log(Function.prototype.__proto__ === Object.prototype);
页:
[1]