daily pastebin goal
61%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var facebookProfile = {
  2.     name : "Juan",
  3.     friends : 0,
  4.     messages : ["yes", "no", "maybe"],
  5.    
  6.     addFriend: function (){
  7.         facebookProfile.friends += 1;
  8.     },
  9.     removeFriend: function (){
  10.         facebookProfile.friends -= 1;
  11.     },
  12.     postMessage : function (message){
  13.         facebookProfile.messages.push(message);
  14.     },
  15.     deleteMessage : function (index){
  16.         facebookProfile.messages.splice(index,1);
  17.     }
  18. };
RAW Paste Data
Top