<分区>
构造函数:
function Team (type) {
this.type = type;
}
//this will output this empty object inherited from Object.property
console.log(Team.prototype);
-> Team {}
//this one outputs nothing in my console
console.log(Object.getPrototypeOf(Team));
//is it inheriting from this one, the one for all functions?
-> Function.prototype //??
.prototype
属性和 Object.getPrototypeOf
有什么区别?
除了存储属性之外,Function.prototype(所有函数和构造函数都继承自的那个)原型(prototype)还有什么作用?