Created
February 22, 2014 16:37
-
-
Save 1dolinski/9157635 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
function Person(gender) { | |
this.gender = gender; | |
alert('Person instantiated'); | |
} | |
// What does this line do? | |
Person.prototype.gender = ''; | |
var person1 = new Person('Male'); | |
var person2 = new Person('Female'); | |
//display the person1 gender | |
alert('person1 is a ' + person1.gender); // person1 is a Male |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment