ƒ # 奇怪的原型链的函数?

版权声明:个人笔记,不喜勿喷 https://blog.csdn.net/qq_39571197/article/details/88575251
const A = function(){};
A.__proto__ =  undefined; // or null
A.prototype = undefined; // or null

console.log(A); // ƒ #<Function>

const a = new A();
console.log(a.__proto__ === Object.prototype); // true

猜你喜欢

转载自blog.csdn.net/qq_39571197/article/details/88575251