Created
May 21, 2013 12:55
-
-
Save dpogorzelski/5619565 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
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