Last active
July 26, 2021 13:20
-
-
Save eamon0989/f872bbefc10fce247d47f09799df9a5f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Factory() { | |
this.foo = 1; | |
this.bar = 'string'; | |
} | |
let descendant = new Factory(); | |
console.log(Factory.prototype); // {} | |
console.log(Object.getPrototypeOf(Factory.prototype)); // [Object: null prototype] {} | |
console.log( | |
Object.getPrototypeOf(Factory.prototype) === | |
Object.prototype); // true | |
console.log(Object.prototype.isPrototypeOf(Factory.prototype)); // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment