Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

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 praveenkishor123/aadad7d05e9f9ad32e3b9c4cde4f5ef3 to your computer and use it in GitHub Desktop.
Save praveenkishor123/aadad7d05e9f9ad32e3b9c4cde4f5ef3 to your computer and use it in GitHub Desktop.
Prototype in Javascript
var myObject = function(name){
this.name = name;
return this;
};
console.log(typeof myObject.prototype); // object
myObject.prototype.getName = function(){
return this.name;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment