Skip to content

Instantly share code, notes, and snippets.

@lifeinafolder
Created January 20, 2011 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lifeinafolder/788411 to your computer and use it in GitHub Desktop.
Save lifeinafolder/788411 to your computer and use it in GitHub Desktop.
var myFunkyLibrary = (function(){
var _prop1 = ''; // this property turned private. woozahh!
//function meant for internal usage. This is truly private now.
var _fn2 = function(){};
return {
prop2 : 'some value here', //public property
fn = function(){} //public function of the library
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment