Skip to content

Instantly share code, notes, and snippets.

@julianlconnor
Last active August 29, 2015 14:19
Show Gist options
  • Save julianlconnor/a104205ec2cd417ffc6d to your computer and use it in GitHub Desktop.
Save julianlconnor/a104205ec2cd417ffc6d to your computer and use it in GitHub Desktop.
example user class
function User(firstName, lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
User.prototype.fullName = function() {
return this.firstName + ' ' + this.lastName;
}
userObjects.each(function(user) {
var u = new User(user.firstName, user.lastName);
userStore.store(u);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment