Created
April 26, 2018 17:39
-
-
Save arrbxr/fcef6ab78a6053a6e3ecc1d6e4a76bd7 to your computer and use it in GitHub Desktop.
facebook created by arrbxr - https://repl.it/@arrbxr/facebook
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
| var facebookProfile = { | |
| name : "Abhishek Raj RAvi", | |
| friends : 50, | |
| messages : ["Hello", "how are you", "i'm fine"], | |
| postMessage : function (message){ | |
| this.messages.push(message); | |
| return this.messages; | |
| }, | |
| deleteMessage : function(index){ | |
| this.messages.splice(index,1); | |
| return this.messages; | |
| }, | |
| addFriend : function(){ | |
| this.friends++; | |
| return this.friends; | |
| }, | |
| removeFriend : function(){ | |
| this.friends--; | |
| return this.friends; | |
| }, | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment