Skip to content

Instantly share code, notes, and snippets.

@arrbxr
Created April 26, 2018 17:39
Show Gist options
  • Select an option

  • Save arrbxr/fcef6ab78a6053a6e3ecc1d6e4a76bd7 to your computer and use it in GitHub Desktop.

Select an option

Save arrbxr/fcef6ab78a6053a6e3ecc1d6e4a76bd7 to your computer and use it in GitHub Desktop.
facebook created by arrbxr - https://repl.it/@arrbxr/facebook
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