Constructor:
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 //??
What is the difference between the .prototype
property and Object.getPrototypeOf
?
What's else does Function.prototype (the one that all functions and constructors inherit from) prototype do, except for storing properties?