Skip to content

Instantly share code, notes, and snippets.

@danjesus
Created September 9, 2011 04:01
Show Gist options
  • Select an option

  • Save danjesus/1205465 to your computer and use it in GitHub Desktop.

Select an option

Save danjesus/1205465 to your computer and use it in GitHub Desktop.
Singleton Pattern Javascript
var Cart = {
init: function(){
},
addItem: function(){
},
updateItem: function(){
},
removeItem: function(){
},
emptyCart: function(){
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment