Skip to content

Instantly share code, notes, and snippets.

@amadden80
Created March 23, 2015 19:54
Show Gist options
  • Select an option

  • Save amadden80/74c0ee6c267eeb6fc077 to your computer and use it in GitHub Desktop.

Select an option

Save amadden80/74c0ee6c267eeb6fc077 to your computer and use it in GitHub Desktop.
Example of a User IRL
var user = {
name: 'Lichard DeGray',
age: 65,
email: 'lichyLich803@aol.com',
username: 'lichyLich803',
friends: ['omily53', 'katkatPapaSmurf', 'annie.lin'],
post: function(){
// Do all the stuff needed to post a entry/post
// return 'I posted as ' + this['name'];
return 'I posted as ' + this.name;
}
};
//
var users = [{
name: 'Lichard DeGray',
age: 65,
post: function(){
return 'I posted';
}
},
{
name: 'Kathew Bad',
age: 66,
post: function(){
return 'I posted';
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment