Skip to content

Instantly share code, notes, and snippets.

@zspencer
Forked from eyston/gist:1701339
Created January 30, 2012 01:10
Show Gist options
  • Save zspencer/1701760 to your computer and use it in GitHub Desktop.
Save zspencer/1701760 to your computer and use it in GitHub Desktop.
Account = (function(startingBalance) {
return {
balance: startingBalance,
getBalance: function() {
return this.balance
}
};
})
var accountOne = Account(0);
var accountTwo = Account(100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment