Skip to content

Instantly share code, notes, and snippets.

@brianyang
Created April 15, 2013 22:32
Show Gist options
  • Save brianyang/5391827 to your computer and use it in GitHub Desktop.
Save brianyang/5391827 to your computer and use it in GitHub Desktop.
module pattern
var MODULE = (function(){
// define variable in closure
var module = {}
module.UI = function(){
alert('invoked module.UI')
}
module.behavior = function(){
alert('invoked module.behavior')
}
return module
}())
MODULE()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment