Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save irridescentrambler/550e4097715752ca4347afaec9480102 to your computer and use it in GitHub Desktop.
Save irridescentrambler/550e4097715752ca4347afaec9480102 to your computer and use it in GitHub Desktop.
function Person(name, city){
this.name = name;
this.city = city;
}
Person.prototype.greet = function(){
console.log("Hello my name is " + this.name);
}
function Developer(name, city, language){
Person.call(name, city);
this.language = language;
}
var nikhil = new Developer("Nikhil", "Pune", "Javascript");
console.log(nikhil);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment