Created
August 26, 2017 18:03
-
-
Save claudiainbytes/e015eee99f2cc5590981bf79893e5006 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| /* | |
| * Programming Quiz: Facebook Friends (7-5) | |
| */ | |
| // your code goes here | |
| var facebookProfile = { | |
| name: "Claudia", | |
| friends: 100, | |
| messages: ["Happy birthday", "I love you", "XOXO", "Bless you"], | |
| postMessage: function(message){ | |
| this.messages.push(message); | |
| }, | |
| deleteMessage: function(index){ | |
| this.messages.splice(index, 1); | |
| }, | |
| addFriend: function(){ | |
| this.friends++; | |
| }, | |
| removeFriend: function(){ | |
| this.friends--; | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment