Skip to content

Instantly share code, notes, and snippets.

Created September 9, 2011 17:07
Show Gist options
  • Save anonymous/1206756 to your computer and use it in GitHub Desktop.
Save anonymous/1206756 to your computer and use it in GitHub Desktop.
(function(){
window.Game = function(){
var self = {};
//public methods
self.play = function(){}
//private methods
var score = function() {};
return self;
};
var game = Game();
game.play()
//game.score => error
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment