Last active
July 30, 2017 09:14
-
-
Save sergiors/a89b5f4cb09b77c24c82 to your computer and use it in GitHub Desktop.
User.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
})(); | |
My brain does not compute. What's this used for?
how to get a sub panel ?]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ok can anyone explain this to me. How does it work?
Please