Skip to content

Instantly share code, notes, and snippets.

@devinrhode2
Created July 18, 2012 08:21
Show Gist options
  • Save devinrhode2/3135018 to your computer and use it in GitHub Desktop.
Save devinrhode2/3135018 to your computer and use it in GitHub Desktop.
Example enclosure pattern
/**
* Hospitals.js example
* by DevinRhode2
*/
//'globals':
var Hospitals = {};
(function(){
'use strict';
//not global:
var index = 0;
//Add a function to your global object
Hospitals.external = function HospitalsExternal(){
};
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment