Skip to content

Instantly share code, notes, and snippets.

@dpogorzelski
Created May 21, 2013 12:55
Show Gist options
  • Save dpogorzelski/5619565 to your computer and use it in GitHub Desktop.
Save dpogorzelski/5619565 to your computer and use it in GitHub Desktop.
var Person = function(name, surname, gender){
this.name = function(){
console.log('instance function ' + name);
};
this.surname = surname;
this.gender = gender;
};
Person.prototype.getGender = function(){
console.log('prototype function ' + this.gender);
};
var dawid = new Person('Dawid', 'Pogorzelski', 'male');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment