Skip to content

Instantly share code, notes, and snippets.

@Obayanju
Last active August 13, 2018 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Obayanju/36c2aecfbc31b805ee3f5406db0612ee to your computer and use it in GitHub Desktop.
Save Obayanju/36c2aecfbc31b805ee3f5406db0612ee to your computer and use it in GitHub Desktop.
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