Skip to content

Instantly share code, notes, and snippets.

@sergiors
Last active July 30, 2017 09:14
Show Gist options
  • Save sergiors/a89b5f4cb09b77c24c82 to your computer and use it in GitHub Desktop.
Save sergiors/a89b5f4cb09b77c24c82 to your computer and use it in GitHub Desktop.
User.js
var User = (function() {
'use strict';
var user = {};
function User(attrs) {
user.profile = attrs.profile || {};
user.address = attrs.address || {};
user.payments = attrs.payments || {};
}
User.prototype.getProfile = fucntion() {
return user.profile;
}
User.prototype.getAddress = fucntion() {
return user.address;
}
return User;
})();
@jamesleelee
Copy link

thanks bro you safe me.....thanks you

@eduhd
Copy link

eduhd commented Jun 13, 2016

oi

@ladyleo940
Copy link

ok can anyone explain this to me. How does it work?
Please

@derekbtw
Copy link

My brain does not compute. What's this used for?

@icalkun
Copy link

icalkun commented Jun 5, 2017

how to get a sub panel ?]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment