Last active
August 13, 2018 00:43
-
-
Save Obayanju/36c2aecfbc31b805ee3f5406db0612ee 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 Planet() { | |
// .... | |
} | |
// create a new prototype object | |
Planet.prototype = {/* .. */}; | |
let mars = new Planet(); | |
mars.constructor === Planet; // false | |
mars.constructor === Object; // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment