Created
February 24, 2015 20:53
-
-
Save singerxt/c0e84076c66d9b4d46cc 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 woman = new Person('Kate', 'Khowalski'); | |
woman.firstName; // 'Kate' | |
woman.lastName; // 'Khowalski' | |
woman.fullName; //'Kate Khowalski | |
woman.species; // human | |
/* | |
* Change firstName | |
*/ | |
woman.firstName = 'Yulia'; | |
woman.firstName; // 'Yulia' | |
woman.lastName; // 'Khowalski' | |
woman.fullName; // 'Yulia Khowalski' - How to do that !? | |
woman.species = 'fish'; | |
woman.species; // human - No, you can't change this property. | |
/* | |
* Change fullName | |
*/ | |
woman.fullName = 'Joana Stevens'; | |
woman.firstName; //Joana | |
woman.lastName; //Stevens |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment