Skip to content

Instantly share code, notes, and snippets.

@dealingwith
Created August 4, 2014 21:40
Show Gist options
  • Save dealingwith/70fda36fe898aa0229dd to your computer and use it in GitHub Desktop.
Save dealingwith/70fda36fe898aa0229dd to your computer and use it in GitHub Desktop.
(function() {
var store = {};
store.products = ['John','Judy','Dijion'];
return {
sayHello: function(text) {
return "Factory says yo: " + text;
},
sayGoodbyeProduct: function() {
return "Factory says prodcucts are " + store.products[0] + ", " + store.products[1] + ", " + store.products[2];
}
}
// What does an additional function, like "sayHello" look like?
})().sayGoodbyeProduct();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment